how to prevent browser to jump on top ??

how to prevent browser to jump on top ??

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.   <script src="http://code.jquery.com/jquery-latest.js"></script>
  5. </head>
  6. <body>
  7.   
  8. <a href="http://jquery.com">default click action is prevented</a>
  9. <div id="log"></div>

  10. <script>
  11. $("a").click(function(event) {
  12.   event.preventDefault();
  13.   $('<div/>')
  14.     .append('default ' + event.type + ' prevented')
  15.     .appendTo('#log');
  16. });
  17. </script>

  18. </body>
  19. </html>
this program works very fine for links but if the condition is like this <input type="submit"> 
then what is the solution?? I mean what if i have submit button of form instead of link.
actually i want to use it in php files.