Submit.onBlur : submit button « Form « JavaScript Tutorial






The onBlur event handler is fired when the focus is moved away from that particular submit button.

<html>
    <head>
    <script language="JavaScript">
    <!--
    var counter = 0;

    function comeBack(){
      document.myForm.mySubmit.focus();
      document.myForm.counter.value = counter++;
    }
    -->
    </script>
    </head>
    <body onLoad='comeBack()'>
    <form name="myForm">
      <input type=TEXT value="Text Box" name="myText">
      <input type=SUBMIT value="Submit" name="mySubmit" onBlur='comeBack()'><br>
      <input type=TEXT size=2 value="" name="counter">
    </form>
    </body>
    </html>








10.26.submit button
10.26.1.Submit
10.26.2.Submit.blur()
10.26.3.Submit.click()
10.26.4.Submit.focus()
10.26.5.Submit.form
10.26.6.Submit.handleEvent()
10.26.7.Submit.name
10.26.8.Submit.onBlur
10.26.9.Submit.onClick
10.26.10.Submit.onFocus
10.26.11.Submit.type
10.26.12.Submit.value
10.26.13.Return false in form button click event
10.26.14.Using Image as the submit button