1.框架间调用
self.parent.frames("main").location=$("#periodSelect").data($("#periodSelect option:selected").html()).url;
2.jquery中得到选择的option
$("#periodSelect option:selected").html()
3.反射
private static Object getProperty(Estate estate,String property){
Object obj=null;
try {
Method methods[] = Estate.class.getMethods();
for (Method method : methods) {
if(method.getName().toUpperCase().indexOf(property.toUpperCase())>=0&&
method.getName().indexOf("get")>=0){
try {
obj=method.invoke(estate);
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
} catch (SecurityException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
return obj;
}