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< ......
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat=" ......
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
/// <summary>
/// Summary description for Commen ......
客户端代理的作用
在对象里做了一个标记
–“__type” = “ComplexType.Color”
服务器端根据标记选择反序列化的目标类型
可出现“多态”效果
Employee.cs Code:
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Secu ......