用Javascript替换链接
我在html中有个链接
<a style="font:12px arial; color:#000003; " onmouseover="style.textDecoration='underline';"
onmouseout="style.textDecoration='none';"
href="http://www.yahoo.com" target="Main" id="ID1">click me</a>
在这个页面上有个button或checkbox, 我想用户在按了这个button后上面的link边成另一个,就是上面的变成:
<a style="font:12px arial; color:#000003; " onmouseover="style.textDecoration='underline';"
onmouseout="style.textDecoration='none';"
href="http://www.mywebsite.com" target="Main" id="ID1">click me</a>
光是href中的内容变,其余不便,该怎么写,我只想在client端写,用javascript如innerHTML