SELECT控件add方法 ie 类型不匹配

s = document.createElement('select');

try{

//for ie8 or earlier
s.add(new Option('text','value'),s.options[null]);
}catch(e){
s.add(new Option('text','value'),null);
}

posted @ 2013-10-13 20:36  NW_KNIFE  阅读(352)  评论(0编辑  收藏  举报