jquery中load方法在ie下会卡住
function ChangeMetho(name) { metho = name; $("#divroot").html("<img src=\"/2010/img/loading.gif\" width=\"32\" height=\"32\" />数据加载中..."); $("#divroot").load("JDLYHandler.ashx?metho=root", { "resultType": "html" }); }
原本是这样加载的,但是发现问题就是ie下会出现切换内容加载的时候会卡住~~~~一直提示在取数据
后改为:
function ChangeMetho(name) { metho = name; $("#divroot").html("<img src=\"/2010/img/loading.gif\" width=\"32\" height=\"32\" />数据加载中..."); $.get("JDLYHandler.ashx", { metho: "root" }, function(data) { $("#divroot").html(data); }, "html"); }
直接用get或者post效率更高