$(document).click(function() { alert("you clicked"); });
protected void Button1_Click(object sender, EventArgs e) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "alert('Message')", true); }
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="jquery-1.10.2.js" type="text/javascript"></script> <script type="text/javascript"> var clickpage = function () { document.getElementById('btn').onclick = function () { document.onclick = function () { return false; } }; document.onclick = function () { alert('clicked'); } } </script> </head> <body onload="clickpage()"> <form id="form1" runat="server"> <asp:Button Text="text" ID="btn" runat="server" /> </form> </body> </html>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)