JavaScript and jquery modify the href attribute of a tag_jquery
- WBOYOriginal
- 2016-05-16 17:08:491441browse
javascript:
document.getElementById("myId").setAttribute ("href","www.xxx.com");
document.getElementById("myId").href = "www.xxx.com";
jquery:
$("#myId").attr("href"," www.xxx.com");
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn