
{
window.open("Buy.asp?id=2","a", "height=350, width=400, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no")
}
用传值来进行 *** 作 。
可以用子页面后加 ?变量名=值,比如 aaa.asp?id=1000在子页面中就用 a=request("id")
也可以用客户端全局变量 session("id"),这样是全局的,任何页面都可以用session("id")了
在本页中加入脚本:<script language="javascript" type="text/javascript">
function ScanMessageDetail(messageId)
{
if(window.showModalDialog("testclose.aspx?messageid="+messageId,"","status=nodialogWidth=800pxdialogHeight=500pxmenu=noresizeable=yesscroll=yescenter=yesedge=raise")=="OK")
{
document.location.href = "DataListTest.aspx"
}
}
</script>
在后台中注册脚本
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onclick", "ScanMessageDetail(4939)")
}
}
在目标页的关闭按钮
<input id="Button1" type="button" value="关闭" onclick="javascript:window.returnValue='OK'self.close()"/>
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)