var xmlHttp = null;
function CreateXmlHttp(){
if (window.XMLHttpRequest) {
xmlHttp = new XMLHttpRequest();
} else {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
}
function LoadDiv() {
var objcurr = document.getElementById("squard");
if (objcurr.style.display == "none") {
objcurr.style.display = "block";
document.getElementById("transfer").style.display = "none";
if (objcurr.innerHTML == "") {
CreateXmlHttp();
xmlHttp.onreadystatechange = loadDivCallback;
xmlHttp.open("GET", "get_def_div.aspx?n=" + name + "");
xmlHttp.send(null);
}
}
}
function loadDivCallback() {
if (xmlHttp.readyState == 4) {
document.getElementById("squard").innerHTML = xmlHttp.responseText;
}
}
<li οnmοuseοver="LoadDiv('squard')"><a href="#">阵容</a></li>
GET页面,将要返回的内容:
protected void Page_Load(object sender, EventArgs e)
{
//if (!IsPostBack)
//{
//string name = Request.QueryString["name"];
databind2tran();
//}
}
private void databind2tran()
{
ExSqlProc ep = new ExSqlProc();
DataTable dt = ep.exe_s_info_items(10, "转会", 1);
Repeater1.DataSource = dt;
Repeater1.DataBind();
}
GET页面HTML
<form id="form1" runat="server">
<ul>
<asp:Repeater ID="Repeater1" runat="server">
<ItemTemplate>
<li><a href="#" target="_blank"><%# Eval("title") %></a><p class="p_hide"><%# Eval("number") %></p></li>
</ItemTemplate>
</asp:Repeater>
</ul>
</form>