JQuery: Why Unobtrusive JavaScript / Document Ready function rather than OnClick event?
问题 I've just started looking at JQuery. I don't have any AJAX in my web application at present. My existing JavaScript in my HTML looks like: <form ...> <p>Find what? <input ...></p> <div class="ButtonArray"> <a href="AddRecord.ASP&Action=ADD">ADD</a> <a href="#" onClick="return MyFormSubmit();">FIND</a> </div> </form> This displays Buttons for [Add] and [Find]. For Find it is necessary to Submit the form, and I use MyFormSubmit() which validates the data, adds a visual effect to the page, and