日期:2014-05-16 浏览次数:20825 次
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test11.aspx.cs" Inherits="Test11" %>
<%--<%@ Register src="control/TestCity.ascx" tagname="TestCity" tagprefix="uc1" %>--%>
<!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="server">
<title></title>
<%-- <script src="js/ajax.js" type="text/javascript"></script>--%>
<script type="text/javascript">
var xmlHttp = null;
function loadXmlHttp() {
if (window.XMLHttpRequest) { // IE7, Mozilla, Safari, Opera, etc.
xmlHttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP"); // IE 5.x and 6
}
catch (e) {
alert(e);
}
}
}
function sendRequest() {
// alert(url);
loadXmlHttp();
// alert(xmlHttp);
if (xmlHttp) {
// Open HTTP connection to url.
xmlHttp.open("GET", "ChangeCity.ashx", true); // true = async
// Define the callback function for async call
xmlHttp.onreadystatechange = onCallback;