1.a标签的href的修改
① javascript:
document.getElementById("myId").setAttribute("href","www.xxx.com");
document.getElementById("myId").href = "www.xxx.com";
②jquery:
$("#myId").attr("href","www.xxx.com");
① javascript:
document.getElementById("myId").setAttribute("href","www.xxx.com");
document.getElementById("myId").href = "www.xxx.com";
②jquery:
$("#myId").attr("href","www.xxx.com");