Edit The Code:
See Result »
Try it Yourself - ©
w3big.com
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>本教程(w3big.com)</title> <script> function changeTarget(){ document.getElementById('w3s').target="_blank"; } </script> </head> <body> <a id="w3s" href="http://www.w3cschool.cc">访问 W3Cschool</a> <br><br> <input type="button" onclick="changeTarget()" value="修改target"> <p>尝试在你单击按钮之前点击链接。</p> </body> </html>