62,271
社区成员
发帖
与我相关
我的任务
分享
if (!string.IsNullOrEmpty(Request.QueryString["abcd"]))
{
// 将得到的数据返回到子页面
Response.Write(Lb_msgnum.Text + "-->>");
Response.End();
}
function getPart(url){
xmlhttp.open("get",url,true);
xmlhttp.onreadystatechange = function(){
if(xmlhttp.readyState == 4)
{
if(xmlhttp.status == 200)
{
alert("成功了进来");
if(xmlhttp.responseText!=""){
//这块意义不大,主要是传递到父页面,要局部刷新的!
alert(xmlhttp.responseText)
}
}
else
{
//document.getElementById("partdiv").innerHTML = "数据载入出错";
alert("数据载入出错");
}
}
}
xmlhttp.setRequestHeader("If-Modified-Since","0");
xmlhttp.send(null);
}
//接收弹出窗体的返回值,重新加载父窗体.
function AlertMsgBox(MsgBox) {
alert(MsgBox);
//刷新父页面,并加载当前页面
// getPart("/Manage/user.aspx?abcd=1");
parent.window.location.href="/Manage/user.aspx?msgflag=1";
}
if (!IsPostBack)
{
//在这里更改某一控件的值
if (!string.IsNullOrEmpty(Request.QueryString["abcd"]))
{
int userid = Convert.ToInt32(Zmn.Web.Controls.UserValue.UserID);
int msgnum = MsgBll.GetPageCounts(userid);
Lb_msgnum.Text = msgnum.ToString();
// Response.Write("<script>window.location ='user.aspx' </script>");
//这里是该刷新了吧,但就是无法实现局部刷新的啊。呵
}
}