单击按钮时打开一个新窗口

  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <script>
  5. function openWin() {
  6. window.open("http://www.yousite.com");
  7. }
  8. </script>
  9. </head>
  10. <body>
  11.  
  12. <form>
  13. <input type="button" value="打开新窗口" onclick="openWin()">
  14. </form>
  15.  
  16. </body>
  17. </html>