【关于动态添加opiton的问题】 document.all.r0.options[document.all.r0.options.length] = new Option("v","t") 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.cnblogs.com/goody9807/archive/2005/07/05/186602.html var op = document.createElement("OPTION"); select .options.add(op); op.innerText = temp; op.value = i; <script defer>function fnc(){re_name.value=r0.options[r0.selectedIndex].text}function fncAdd(){var txt=document.all.re_name.value;if (txt.length>0 && r00.innerText==""){r00.innerHTML += txt;haha.style.display="none";}}</script><input type=text id=re_name style="width:95px;height:20px;font-size:10pt;" value=""><span style="width:20px;border:0px solid red;"> <select id="r0" style="margin-left:-100px;width:118px; background-color:#FFEEEE;" onChange="fnc();"> <option value="1" id="r01">111111</option> <option value="2" id="r02">222222</option> <option value="3" id="r03">333333</option> <option value="0" id="r00"></option> </select> </span> <span id=haha><input type="button" value="add a new" onclick="fncAdd();"></span> var item=document.createElement("option");item.text="fdsafdsa";slts.add(item); 关于JS前台调用后台方法的带参数 js 访问父框架中的frame,出现拒绝访问的错误,怎么解决 有关IE 和火狐 event 兼容性的问题。 求助,JQuery改变<a>Hover的链接颜色 如何访问可编辑的table中的值 一个简单的问题,可是我却不会 有关动态生成带事件的表格 帮忙解密下这个JS代码 ExtJS 4 如何将MVC模式中store数据取出来? 又申请了一个账号,同样的问题:VML 矢量图形怎么转化为jpg文件?急等 有关使用xmlhttp 实现多文件上传的问题 如何获取图片大小?
select .options.add(op);
op.innerText = temp;
op.value = i;
function fnc(){
re_name.value=r0.options[r0.selectedIndex].text
}function fncAdd(){
var txt=document.all.re_name.value;
if (txt.length>0 && r00.innerText=="")
{r00.innerHTML += txt;
haha.style.display="none";}
}
</script><input type=text id=re_name style="width:95px;height:20px;font-size:10pt;" value="">
<span style="width:20px;border:0px solid red;">
<select id="r0" style="margin-left:-100px;width:118px; background-color:#FFEEEE;"
onChange="fnc();">
<option value="1" id="r01">111111</option>
<option value="2" id="r02">222222</option>
<option value="3" id="r03">333333</option>
<option value="0" id="r00"></option>
</select>
</span>
<span id=haha><input type="button" value="add a new" onclick="fncAdd();"></span>
item.text="fdsafdsa";
slts.add(item);