Best unobtrusive way to add JQuery confirm to an arbitrary element
问题 I'm new to jquery, and am looking for a good unobtrusive way to add a jquery replacement for javascript "confirm" to a HTML elements. Specifically I want to be able to use it for ASP.NET Buttons, LinkButtons, ImageButtons, HyperLink etc, which client-side means any of: <input type="submit"... /> <a href="javascript:__doPostBack... /> <input type="image"... /> ... etc ... A solution I've come up with is to add a custom attribute to the ASP.NET server control (and hence to the client element),