Ajax框架
var XmlHttp;
var PathUrl;
function createXmlHttp() {
if (window.ActiveXObject) {
return new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.XMLHttpRequest) {
return new XMLHttpRequest();
}
}
function goAjax() {
XMLHttpRequest = createXmlHttp();
XMLHttpRequest.onreadystatechange = window[funName];
XMLHttpRequest.open("POST", PathUrl, true);
XMLHttpRequest.send(null);
}
function goAjaxMethod(funName, path) {
PathUrl = path;
if (goAjaxMethod.length < arguments.length) {
PathUrl = PathUrl + "?";
for (var index = goAjaxMethod.length; index < arguments.length; index = index + 2) {
if (index = goAjaxMethod.length) {
PathUrl = PathUrl + arguments[index] + "=" + encodeURIComponent(arguments[index + 1]);
}
else {
PathUrl = PathUrl + "&" + arguments[index] + "=" + encodeURIComponent(arguments[index + 1]);
}
}
}
goAjax(funName);
}
function requestText() {
return XMLHttpRequest.responseText;
}
function isSuccess() {
if (xmlHttpRequest.readyState == 4 && xmlHttpRequest.status == 200) {
&nbs
相关文档:
//ajax 获取数据
//脚本
var showResp=0;
function GetXmlHttpObject(handler)
{
var objXmlHttp = null;
if (document.all)//!window.XMLHttpRequest
{
// 创建IE中的XMLHttpRequest对象“XMLHTTP”
var clsids = ["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP. ......
一个简单ajax repeater分页demo 改进版. 代码如下..
<a href="javascript:void(0)" mce_href="javascript:void(0)" onclick="getData(0)">1</a>
<a href="javascript:void(0)" mce_href="javascript:void(0)" onclick="getData(1)">2< ......
jQuery是一个可以简化 JavaScript?以及AJAX(Asynchronous JavaScript
+XML,异步Javascript和XML)编程的Javascript库。不同于其他的Javascript库,jQuery有他自己的哲学,使你可
以很简单的编写代码。这篇文章就会带领你见识一下jQuery的哲学,探讨一下他的特性以及功能,并且会做一些ajax的示例,以及如何使用plug-
......