js 的post提交的写法

function AddEditDevice(data){
var form = $("#deviceEditform");
if (form.length == 0) {
form = $("<form id='deviceEditform' action='/sites/device.aspx' method='get' target='_blank' style='display:none'></form>");
$("body").append(form);
}
form.empty();
form.append(Elm("Action").val(data["action"]));
if(data["id"]) form.append(Elm("deviceId").val(data["id"]));
if(data["orgId"]!=undefined) form.append(Elm("orgId").val(data["orgId"]));
if(data["type"]!=undefined) form.append(Elm("deviceClass").val(data["type"]));
if(data["target"]!=undefined) form.attr("target",data["target"]);
form.append(Elm("n").val(new Date().getTime()));
form.submit();
}

 

注意这种写法   添加控件

var cSearchAction = CurrentPage.LoadControl("~/UserControls/Device/DeviceSearchAction.ascx");
ISearchActionControl = cSearchAction as IDeviceActionControl;

上一篇:OAuth2.0学习(1-12)开源的OAuth2.0项目和比较


下一篇:java配置SSM框架下的redis缓存