Created
August 6, 2012 17:16
-
-
Save doubledouble/3276768 to your computer and use it in GitHub Desktop.
jQuery.ajax
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//得到整个页面,用于列表页面读取 | |
function getPage(url,param,div){ | |
//对中文进行编码 | |
param = encodeURI(param); | |
document.getElementById(div).innerHTML = "<div style=\"text-align:center; line-height:30px; padding-top:50px;\"><img src=\"/2011/images/down/loading.gif\" width=\"66\" height=\"66\" /><br />数据正在加载中,请稍等……</div>"; | |
jQuery.ajax({ | |
type:"GET", | |
url:url+"?div="+div+param, | |
async: true, | |
dataType: "html", | |
success: function(data){ | |
document.getElementById(div).innerHTML = data; | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment