=====================================前台代码
<input type="button" onclick ="aa();" value="点击" /> <script type="text/javascript"> function aa() { var bu = document.getElementById("Button1"); bu.click(); } </script> <asp:Button ID="Button1" runat ="server" OnClick ="button1_click" />
=====================================后台代码
protected void button1_click(object sender, EventArgs e) { ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('对不起,没有此人!!!')</script>"); }
访问修饰符是protected 或public
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。