求助关于跳出警示框
我的代码是这样的:<script language=vb runat=server>
sub enter(a as object,e as eventargs)
button1.attributes.add("onclick","window.alert('出现错误')
end sub
</script>
<html>
<body>
<form runat=server>
<asp:button onclick=enter text="确定" runat=server id=button1/>
</form>
为什么在第一次运行时,单击"确定"按钮,没反应,而以后几次就可以用了?