The example in this article describes the method of dynamically modifying the hyperlink address with jQuery. Share it with everyone for your reference. The specific implementation method is as follows:
html code is as follows:
<a id="php" href="
Replace the link address of this hyperlink through jQuery to http://www.php.cn /xiazai/, the code is as follows:
$("button").click(function(){ $("#jb51").attr("href","http://www.php.cn/xiazai/")); });
The above is the detailed content of How to use jQuery to dynamically modify hyperlinks. For more information, please follow other related articles on the PHP Chinese website!