没有造型晚装div

时间:2012-03-16 08:16:37

标签: javascript css select html drop-down-menu

我有两个选择框

其中一个是动态的,其中一个是静态的

动态加载javascript(获取并填写facebook朋友),如下所示

function (response) {

                      //console.log(response); 
                      var xxx = '<select id="friend" class="msdropdown" name="friend">';
                      for (i = 0; i < response.length; i++) {
                          xxx = xxx + '<option value"' + response[i]['uid'] + '">' + response    [i]  ['name'] + '</option>';
                       }
                      xxx = xxx + '</select>';
                      friendslist.innerHTML = xxx;
                  });

我给两个选择框都上了课,但动态的那个没有用,我想因为迟到了

我怎么能解决这个问题?

1 个答案:

答案 0 :(得分:0)

在你的情况下加载css文件,因为静态选择正在设置样式,所以我不认为这是一个时间问题。如果你检查firebug中的动态选择框,它是否应用了相同的类/样式?