我在select里加了onChange事件,在IE里没事,在FF里不触发该事件

解决方案 »

  1.   

    如果选择相同的,当然不会触发ONCHANGE事件了!!
      

  2.   

    帮我看看这段吧
    <select name="selSource" onChange="changelocation(document.getElementById('selSource').options[document.getElementById('selSource').selectedIndex].value)">
    <option value="en">English</option>
    <option value="jap">日语</option>
    </select>
    <select name="selTarget">
    </select>
    <script>
    subcat=new Array();
    subcat[1]=new Array("阿拉伯语","en","ab");
    subcat[2]=new Array("English","jap","en");
    subcat[3]=new Array("日语","en","jap");
    var count=3;function changelocation(code)
        {
        document.getElementById('selTarget').options.length = 0; 
        var code=code;
        var i,seltar;
        for (i=1;i <= count; i++)
            {
    if (subcat[i][1] == code)

    document.getElementById('selTarget').options[document.getElementById('selTarget').options.length] = new Option(subcat[i][0], subcat[i][2],true,true);

            }
        }</script>
      

  3.   

    <select name="selSource" onChange="changelocation(document.getElementById('selSource').options[document.getElementById('selSource').selectedIndex].value)">
    getElementById('selSource')<select name="selSource" id="selSource" onChange=....
      

  4.   

    我记得FF不支持getElementById的说...