document.getElementById("DataGrid1").style.display = "none"
button1.Click += new System.Web.UI.ImageClickEventHandler(this.button1_click);
1m钟消失的代码
<script language="javascript" type="text/javascript">
function setMessage()
{
document.getElementById("message").innerHTML = "插入成功";
setTimeout("document.getElementById('message').innerHTML=''",1000);
}
</script>
<div id='message'></div>
protected void Button1_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(this.GetType(), "msg", "<script>setMessage();</script>");
}
<script language="javascript" type="text/javascript">
function setMessage()
{
document.getElementById("message").innerText = "插入成功";
setInterval("window.location='http://www.baidu.com';",1000);
}
</script>
<asp:TextBox ID="Txt1" runat="server" onclientclick="dictselectthis,SYSTEM_BJ_SQXM)"></asp:TextBox>
或者
Txt1.Attributes.Add("onclick","dictselect(this,SYSTEM_BJ_SQXM)")
如果SYSTEM_BJ_SQXM不是变量要这样写
Txt1.Attributes.Add("onclick","dictselect(this,'SYSTEM_BJ_SQXM')")
<asp:TextBox ID="Txt1" runat="server" onclick="dictselectthis,SYSTEM_BJ_SQXM)"></asp:TextBox>
可是系统提示 好像说:TextBox 没有onclick的属性!
=========
1。
不用管那个提示,那是IDE 的验证信息,这样设置是可以正常运行的,
2。
我想
dictselectthis,SYSTEM_BJ_SQXM)
应该是
dictselectt(his,SYSTEM_BJ_SQXM)
3。
如果你喜欢耶可以使用代码方法:
Txt1.Attributes.Add("onclick","dictselect(this,SYSTEM_BJ_SQXM)")
Txt1.Attributes.Add("onclick","dictselect(this,SYSTEM_BJ_SQXM)")
加在那里啊?
是前台的页面,还是后台的代码 啊 ?
<body onbeforeunload="window.event.returnValue = '真的要离开此页面吗?';">