$.ajax({
url:url, $(dlgId).load(url);
type:'post', $(dlgId).dialog('open');
dataType:'html',
error:function(){
$.boxUtil.alert("请求异常");
},
success:function(data){
$(dlgId).html(data);
$(dlgId).dialog('open');
}
});
data returns a page. Loading $("...").width() in HTML will report an error.
The url is the request address, and the return is also a page. In the load loading page, the $("...").width() method works just fine, I don't know why
This is written in the document,
jQuery.ajax()
里你用dataType: "html"
返回的是html纯文本,而用.load()
The returned html will be directly inserted into the node wrapped with $. Also, you spelled width wrong. . .