fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <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", function(i, origValue){ return origValue + "/jquery"; }); }); }); </script> </head> <body> <p><a href="http://www.fmpq.com" id="paoo">Fmpq教程</a></p> <button>修改 href 值</button> <p>点击按钮修改后,可以点击链接查看 href 属性是否变化。</p> </body> </html>
运行结果