fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"> </script> <script> $(document).ready(function(){ $("button").click(function(){ $("#paoo").attr("href","http://www.fmpq.com/jquery"); }); }); </script> </head> <body> <p><a href="http://www.fmpq.com" id="paoo">Fmpq教程</a></p> <button>修改 href 值</button> <p>点击按钮修改后,可以点击链接查看链接地址是否变化。</p> </body> </html>
运行结果