展开全部
在本页中加入脚本:
<script language="javascript" type="text/javascript">
function ScanMessageDetail(messageId)
{
if(window.showModalDialog("testclose.aspx?messageid="+messageId,"","status=no;dialogWidth=800px;dialogHeight=500px;menu=no;resizeable=yes;scroll=yes;center=yes;edge=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();"/>
<script language="javascript" type="text/javascript">
function ScanMessageDetail(messageId)
{
if(window.showModalDialog("testclose.aspx?messageid="+messageId,"","status=no;dialogWidth=800px;dialogHeight=500px;menu=no;resizeable=yes;scroll=yes;center=yes;edge=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();"/>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询