dongzhuoxie1244 2012-06-16 09:26
浏览 40
已采纳

Internet Explorer在链选择中未显示<option>值

I've gone through and seen all the answers on IE and issues, but I believe mine is unique. If not, Sorry.

Im busy building a Vehicle listing website for a friend, and I've had some help from a freelancer who is nowhere to be found now.

IE is not showing my model range when I select a vehicle make on my site.

This is the website View it here!

FF and all other browsers work prefectly. I'll also share some code if needed. Thanks. But Im sure you can see the issue through source code viewer.

Thanks

  • 写回答

2条回答 默认 最新

  • douliao8402 2012-06-16 09:49
    关注

    It is a known bug for ie as IE don't support innerHTML property in case of select menus.

    So,follow this link http://support.microsoft.com/kb/276228

    Try this way instead of innerHTML use outerHTML only you have to also echo <select> tag in getodels.php and also this code is smarter and shorter than yours

    function makeModel(str, change)
    {var xmlhttp;
        if (str!="")
        {
        if (window.XMLHttpRequest)
        {// code for IE7+, Firefox, Chrome, Opera, Safari
            xmlhttp=new XMLHttpRequest();
        }
        else
        {// code for IE6, IE5
            xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");
        }
        xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4 && xmlhttp.status==200)
            {
                var model = document.getElementById("model");
                model.outerHTML=xmlhttp.responseText;
                if(change) {
                }
            }
        }
        xmlhttp.open("GET","getmodels.php?make="+str,true);
        xmlhttp.send();
        }
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?