fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script> function changeLink(){ document.getElementById('myAnchor').innerHTML="W3Cschool"; document.getElementById('myAnchor').href="http://www.fmpq.com"; document.getElementById('myAnchor').target="_blank"; } </script> </head> <body> <a id="myAnchor" href="http://www.microsoft.com">Microsoft</a> <input type="button" onclick="changeLink()" value="修改链接"> </body> </html>
运行结果