替换当前文档

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <button onclick="window.location.replace('http://www.yousite.com')">
  6. 替换文档
  7. </button>
  8.  
  9. </body>
  10. </html>