WEB前端开发群:17784629
<html> <head> <script type="text/javascript"> function changeLink() { document.getElementById('myAnchor').innerHTML="访问XIPINGBAR" document.getElementById("myAnchor").href="http://www.xipingbar.com/" document.getElementById("myAnchor").target="_self" } </script> </head> <body> <a id="myAnchor" href="../../www.microsoft.com/default.htm">访问 Microsoft</a> <input type="button" onclick="changeLink()" value="改变链接"> </body> </html>
提示:你可以先修改部分代码再运行。
Posted in JS基础练习题.
Tagged with onclick, 更改.
No comments
By yflintao – 2010年07月27日
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
留下评论 Cancel Some HTML is OK
Name (required)
Email (required, but never shared)
Web
or, reply to this post via trackback.
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.