20071226 firefox select options 郁闷
http://www.yippeesoft.com
搞了个页面,IE7下OK,结果FF下乱码
发现文件没有另存为UTF-8格式
还有一个问题,在一个DIV里面两个BTN,分别对应ONCLICK
发现第二个点击后居然会还会激发第一个···········
然后又发现 SELECT无法增加删除
改为:
<script type="text/javascript">
<!–
function addSel()&leftsign;
document.frmquestion.lstans.options.add(new Option(document.frmquestion.txtans.value,document.frmquestion.txtans.value));
&rightsign;
//–>
function delSel()&leftsign;
if (document.frmquestion.lstans.selectedIndex>=0) &leftsign;
document.frmquestion.lstans.remove(document.frmquestion.lstans.selectedIndex);
&rightsign;
~~~~~~~~~~~~
原来是:
function removelst(e1, e2)
&leftsign;
Control = null;
Control=eval("document.frmquestion.lstans");
var j=Control.length;
if(j==0) return;
for(j;j>0;j–)
&leftsign;
if(Control.options[j-1].selected==true)
&leftsign;
Control.remove(j-1);
&rightsign;
&rightsign;
&rightsign;
function movelst(ControlName)
&leftsign;
Control = null;
Control=eval("document.frmquestion.lstans");
Control1 = null;
Control1=eval("document.frmquestion.txtans");
var j=Control1.length;
if(j==0) return;
Control.add(new Option(Control1.value,Control1.value));
&rightsign;
~~~~~~~~~~~~~~~
五花八门的都有·················
一个个试验才找到真正的
http://www.cnlei.org/blog/article.asp?id=316
关于如何删除掉select中的option元素,兼容IE、Firefox …
~~~~~~~~~~~~~~~~~~~~~
错误: uncaught exception: [Exception... "Not enough arguments" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: http://localhost:6759/3333.aspx :: movelst :: line 57" data: no]
错误: document.frmquestion.lstans.options.remove is not a function
源文件:http://localhost:6759/3333.aspx
行:19
~~~~~~~~~~~~~~~~~~~
http://hi.baidu.com/weichaowu/blog/item/43a8c61635954652f2de3243.html
select动态添加options操作
http://www.cnblogs.com/ghostljj/archive/2007/04/30/733417.html
JS对select动态添加options操作[IE&FireFox兼容]
http://mingxinxiaoxiao.spaces.live.com/Blog/cns!A716639135E88F18!1292.entry
firefox和ie
http://huoxicai.blog.163.com/blog/static/16116625200762310405317/
select 操作
转载:JS对select动态添加options操作[IE&FireFox兼容]
JS对select动态添加options操作
http://populace.spaces.live.com/
javascript在IE和FIREFOX的区别研究
http://www.firefoxfans.com/firefox/392.html
FireFox中如何触发onclick事件
http://www.mysdn.cn/web/JavaScript/20061122/70966.html
兼容IE和FIREFOX的select选项操作JS
firefox 中对 select option 操作
http://www.cnblogs.com/raymond19840709/archive/2007/10/29/941791.html
关于FIREFOX和IE兼容SELECT元素问题
http://hi.baidu.com/anxing_space/blog/item/73ebb20a7960051d94ca6b6b.html
firefox与IE浏览器在web开发上面的一些区别
开发准备工作
相关有价值的网站
* 中文firefox开发论坛地址 http://www.firefox.net.cn/newforum
* 讨论IE与Netscape区别的 http://www-128.ibm.com/developerworks/web/library/wa-ie2mozgd/
* http://www.w3schools.com/
javascript在IE和Firefox中的区别1
关于如何删除掉select中的option元素,兼容IE、Firefox …
IE vs. FireFox 系列 – 使用 XMLHTTP 讀取遠端檔案
1 <html>
2 <head>
3 <title>test</title>
4 <script language="javascript">
5 function deleteRow()&leftsign;
6 var selectElement=document.getElementById("select1");
7 selectElement.options.remove(1); //IE:OK Firefox:Failure
8 selectElement.remove(1); //IE:OK Firefox:OK
9 &rightsign;
10 function insertRow()&leftsign;
11 var selectElement=document.getElementById("select1");
12 var option=new Option("eeee",5);
13 selectElement.add(option); //IE:OK Firefox:Failure
14 selectElement.options.add(option);//IE:OK Firefox:OK
15 &rightsign;
16 </script>
17 </head>
18 <body>
19 <input type="button" value="Delete" onclick=\’deleteRow()\’>
20 <input type="button" value="Insert" onclick=\’insertRow()\’>
21 <select id="select1">
22 <option value="1">aaa</option>
23 <option value="2">bbb</option>
24 <option value="3">ccc</option>
25 <option value="4">ddd</option>
26 </select>
27 </body>
28 </html>
历史博文
- 20070514 TestDriven.Net single-instance ADOdb - 2007
- 0501 世乒赛 第48届 不来梅 - 2006
- printer driver DDK - 2005