<table border=1><tr><td id=td1>12345</td></tr></table>
<input type=radio name=aa onclick="if(this.checked)document.all.td1.innerText = '12345'">
<input type=radio name=aa onclick="if(this.checked)document.all.td1.innerText = '67890'">
<input type=radio name=aa onclick="if(this.checked)document.all.td1.innerText = '12345'">
<input type=radio name=aa onclick="if(this.checked)document.all.td1.innerText = '67890'">
解决方案 »
- 如何过滤src中的恶意脚本
- div内部的有效链接能触发div上的事件么?
- 利用数组迭代器扩展数组方法
- 如何分割字符串
- jQuery 画面板 不会画了 请教高手指点
- help关于回调函数的问题
- 15分~请问如何用javascript判断表格中数字是几!
- 使用jqueryeasyui中的dialog如何防止在页面第一次加载时弹出?
- 十万火急!!!在ie5.0下,单击文本框怎么调用两个函数
- 用最簡方法得到當天所在星期的星期一和星期日的方法
- 高分求救,不够再加!!!哪位仁兄有用vbscript或者javascript操作Owc组件的例子!!!Chart 、Spreadsheet
- *****怎么来判断单元格或者层里面得内容是否溢出了哪?
<input type=radio name=aa onclick="if(this.checked) td1.innerText = '12345'">
<input type=radio name=aa onclick="if(this.checked) td1.innerText = '67890'">那就不用document.all
#mxh { position:absolute; top:0; left:10; width:200; }
</style>
<div id="mxh">测试</div>
<br>
<br>
<form name=f>
<input type="radio" name="a" onclick="init(this)" value="12345">12345<br>
<input type="radio" name="a" onclick="init(this)" value="67890">67890<br>
</form>
<script language="javascript">
function init(a){
ie4_NS6=(document.getElementById)?true:false
ns4=(document.layers)?true:false
if(ns4)mxh=document.mxh
mxh.layerHTML=layerwrite
t1= "<table border=0 cellpadding=0 cellspacing=0 width=200><tr><td>"
t1+=a.value
t1+="</td></tr></table>"
mxh.layerHTML(t1)
}
function layerwrite(newhtml){
if(ns4){mxh.document.write(newhtml);mxh.document.close()
}
else mxh.innerHTML=newhtml
}
</script>
<SCRIPT LANGUAGE="JavaScript">
var ie4 = (document.all) ? true : false;
var ns4 = (document.layers) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
function writetolayer(ww) {
if (ie4) document.all["mxh"].innerHTML = ww.value;
if (ns4) {
document["mxh"].document.write(ww.value);
document["mxh"].document.close();
}
if (ns6) document.getElementById("mxh").innerHTML=ww.value;
}
</script>
</HEAD>
<BODY>
<SPAN ID="mxh" style="position:absolute;">测试</SPAN>
<br><br><br>
<form name=f>
<input type="radio" name="a" onclick="writetolayer(this)" value="12345">12345<br>
<input type="radio" name="a" onclick="writetolayer(this)" value="67890">67890<br>
</form>