Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset=utf-8 />
  <title>JS Bin</title>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
  </script>
  <script>
    $(function(){
      $("#btn").on("click",function(){
        var btn = this;
        
        setTimeout(function() {
          btn.disabled = true;
        }, 0);
        alert('clicked');
      });
      
      
      
      $("#frm").on("submit",function(){
        alert("submit1");
        
      });
      
      $("#frm").on("submit",function(){
        alert("submit2");
      });
      
    })
  </script>
  </head>
  
  <body>
    <form id="frm" action="#">
      <input type='submit' id="btn"/>
    </form>
  </body>
</html>
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers