Setting innerHtml of a selection box in IE

后端 未结 2 584
执笔经年
执笔经年 2020-12-11 23:58

On my website there is a situation where I need to append new < //option> tags to a specific selection box. I am doing the following:

1.Make an ajax request which

2条回答
  •  醉梦人生
    2020-12-12 00:22

    http://support.microsoft.com/kb/276228

    It's a known issue in IE. Sorry for wasting everyone's time, long story short options.innerHTML is buggy. The work around Microsoft suggest is wrapping your tag in a tag. Then you can use the div.innerHTML to change the code.

     
    var x ='\n'; IEFix.innerHTML = x;

提交回复
热议问题