ready (fn)
when the DOM is ready to query and operate to bind a function to be executed.
resize ([[data], fn ])
When adjusting the size of the browser window, resize event. It belongs to the window object in the BOM.
focus ([[data], fn ]), blur ([[data], fn])
Trigger focus (blur) event when the element gains (loses) focus.
change ([[data], fn ])
when the value of the element is changed, a change event may occur. ? What condition is detected happen?
select ([[data], fn ])
when textarea type text or text input element is selected, the select event will occur. Only the elements of the input box.
submit ([[data], fn ])
When the form is submitted, it will submit the incident.
<form> tag <button> in a non-IE browser, which is equivalent to the <input type = 'submit'> , click on the submit event is triggered.
(1) submit the form
1 $('form').submit();
(2) prevent the form submission
1 $('form').submit(function(){ 2 return false; 3 });
(3) Form Validation
$ ( 'form') Submit (. function () { // determination value satisfies the value of input validation condition. IF () { // Write code execution return to true ; } the else { // Write code execution return to false ; } } );