1 function remotecontrol() { 2 var progressbar = $("#progressbar"); 3 $.ajax({ 4 url: myurl, 5 type: mytype, 6 data: mydata, 7 contentType: commonType, 8 dataType: jsonType, 9 success: function (data) { 10 var ret = data.d.replace(/ /ig, "<br />"); 11 var obj = eval('(' + ret + ')'); //转换后的JSON对象 12 //if (obj.success) { 13 progressbar.progressbar("value", 100); 14 $('#dlgprogress').dialog('close'); 15 inittabled(obj); 16 $('#dlg').dialog('open').dialog('setTitle', '操作结果'); 17 }, 18 error: function () { 19 $('#dlgprogress').dialog('close'); 20 } 21 }); 22 23 }