试一下这样呢
window.dialogArguments.getElementById("test").length=window.dialogArguments.getElementById("test").length+1;
window.dialogArguments.getElementById("test").options[window.dialogArguments.getElementById("test").length-1].value="";
window.dialogArguments.getElementById("test").options[window.dialogArguments.getElementById("test").length-1].text="";
window.dialogArguments.getElementById("test").length=window.dialogArguments.getElementById("test").length+1;
window.dialogArguments.getElementById("test").options[window.dialogArguments.getElementById("test").length-1].value="";
window.dialogArguments.getElementById("test").options[window.dialogArguments.getElementById("test").length-1].text="";
解决方案 »
- 为什么我JS把文本框的值改变了,但是我POST获取的时候,还是初始值呢
- 关于JS随机数的问题,请教一下
- 推荐一本JS的书
- js 跨域 拒绝访问 高分 在线等待
- 谁能给个javascript的教屏下载地址吗(免费的)
- 紧急求助,框架页面打印问题,我只要打印某个框架,如何实现?
- javascript指定frame里显示特定网页的问题,把我弄蒙了!
- 50分在线求助,关于时间格式输入限制问题???
- javascript连接数据库,总提示:此页正在访问其它域的数据,您允许这样做吗?
- 一个页面有若干frame,刚开始载入的时候提示正在加载,希望等所有的代码和图片都下载了,再打印页面,如何实现?
- 求救,急!!!请各位指教!
- 简单问题:调用IE的“另存”功能是document.execCommand('SaveAs'),那么“发送”中的“电子邮件页面”和"电子邮件连接"应该怎么写呢?
window.dialogArguments.document.all.getElementById("test").options.add(new Option("c","c"));
都报错,"对象不存在或者为空""错误的对象属性或方法"...
<INPUT TYPE="button" value="test" onclick="javscript:okok();">
<script language="JavaScript">
function okok(){
document.all.test.options.add(new Option("c","c"));
}
</script>可以增加成功
<INPUT TYPE="button" id="addtoparent" value="Add selecting item" onclick='window.dialogArguments.addtoparent()'>
dialogArguments.getElementById("test").options.add(new dialogArguments.Option("c","c"));
}