
asp.net模态子窗口点击BOTTON之后会自动关闭怎么办
<scripttype="text/javascript">functionwinClose()window.clo();window.dialogArguments.l...
<script type="text/javascript">function winClose() window.clo();window.dialogArguments.location.reload() }</script>
<body onunload="winClose()" class="body" style="margin:0 auto; width:500px;height:190px" >这是子窗口刷新父窗口代码;
protected void BtnHadDef_Click(object sender, EventArgs e)
{按牛事件
string s1 =
"insert into Defects ([DevID],[DefDesc],[DefHapTime]) values ('"+Request.QueryString["DevID"].ToString()+"','"+this.TxtDefDesc.Text+"','"+this.TxtDefHapTime.Text+"')";
AllClass.saveData(s1);
string s2 = "update Devices set [DevState]='不正常' where DevID='"+Request.QueryString["DevID"].ToString()+"'";
AllClass.saveData(s2); 展开
<body onunload="winClose()" class="body" style="margin:0 auto; width:500px;height:190px" >这是子窗口刷新父窗口代码;
protected void BtnHadDef_Click(object sender, EventArgs e)
{按牛事件
string s1 =
"insert into Defects ([DevID],[DefDesc],[DefHapTime]) values ('"+Request.QueryString["DevID"].ToString()+"','"+this.TxtDefDesc.Text+"','"+this.TxtDefHapTime.Text+"')";
AllClass.saveData(s1);
string s2 = "update Devices set [DevState]='不正常' where DevID='"+Request.QueryString["DevID"].ToString()+"'";
AllClass.saveData(s2); 展开
2个回答
展开全部
先在模式窗口的<head></head>里加上<base target="_self"/>
更多追问追答
追问
加了
追答
function winClose() window.clo();window.dialogArguments.location.reload() }
这个方法也写的不对。window.close();
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询