<div class="htmlarea"> <textarea id="runcode14089"> <title>让单选按钮决定链接的网址</title> <script language="JavaScript"> <!--HIDE function changeIt(newLoc) { document.links[0].href=newLoc } //STOP HIDING--> </script> <a href="http://www.jb51.net"> <h4>选好了点此看效果</h4></a> <form> <input type="radio" name="choices" onclick="changeIt('http://www.jb51.net/codes/')">http://www.jb51.net/codes/ <input type="radio" name="choices" onclick="changeIt('/')">脚本之家 </form></textarea><br><input onclick="runEx('runcode14089')" type="button" value="运行代码"> <input onclick="doCopy('runcode14089')" type="button" value="复制代码"> <input onclick="doSave(runcode14089)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>