title: How to clearTimeout this function?
body: <p>How to clearTimeout this function ?</p>
  
  <p>This is my code, i tried but not work.</p>
  
  <p>How can i do ?</p>
  
  <p>.............................................................................................................................................................</p>
  
  <pre><code>&lt;form id="fid"&gt;
      &lt;input type="text" id="input_type" onkeypress="stop()" onkeyup="run()"/&gt;
  &lt;/form&gt;
  
      &lt;p id="myplace"&gt;&lt;/p&gt;
  
      &lt;script&gt;
      function run() {
          $('#myplace').hide();
          setTimeout(function(){
              $.ajax
              (
                  {
                      url: 'xx.php',
                      type: 'POST',
                      data: $('#fid').serialize(),
                      cache: false,
                      success: function (data) {
                          $('#myplace').show();
                          $('#myplace').html(data);
                      }
                  }
              )
          }, 3000);
      }
  
      function stop() {
          clearTimeout();    
      }    
      &lt;/script&gt;
  </code></pre>