可能重复:
从 javascript 调用 ASP 函数
好的运行这段代码:
<script type="text/javascript">
function hello() {
alert("hello world from javascript ")
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="buttonme" runat="server" OnClientClick="javascript:hello()" Text="click" />
</div>
代码背后:
Protected Sub buttonme_Click(ByVal sender
As Object, ByVal e As EventArgs) Handles buttonme.Click
MsgBox("hello world from vb.net ")
End Sub
会在 vb.net MsgBox 之前执行 javascript 消息吗?有没有办法让它翻转以第二次执行javascript函数谢谢