javascript: 複製程式碼 程式碼如下: document.getElementById("mya). ("href","www.xxx.com"); document.getElementById("myId").href = "www.xxx.com"; jquery: 複製程式碼 程式碼如下: $("#myId").attr("href"," www.xxx.com");