setobject: function (data, scope, win) { //data jsoon数据, scope,一般为form的id,win 窗口对象,如果在当前window win=null
$.each(data, function (id, value) { //循环json数据每个属性
var control; //当前控件
if (scope) {
if(win){
control = $("#" + scope + " #" + id,win);
}else{
control = $("#" + scope + " #" + id);
}
} else {
if(win){
control = $("#" + id,win);
}else{
control = $("#" + id);
} }
}
if (control.is("input[type='radio']")) { //如果当前控件为<inpur type='radio' />
$('input[name='+id+'][value='+value+']',win).attr("checked",true);
}
}