阅读背景:

如何在动态生成的元素上应用样式

来源:互联网 
function createList(arrunique, arrayout) {
    for (i = 0; i < arrayout[0].length; i++) {
        var divIdC = i;
        var divIdT = i + 10;

        $('#tb').append('<select name="combo" style="float:left; width:100px;" id="' + divIdC + '" onchange="getComboVal(this,' + divIdC + ')"></select>');
        $('#tb').append('<input type="text" name = "textBox" style= "width:100px;" id="' + divIdT + '" onkeyup="validate(this,"' + divIdT + '") value="0">');
        var select = document.getElementById(divIdC);
        select.options[select.options.length] = new Option("Select " + arrunique[i][0]);
        for (j = 1; j < arrunique[i].length; j++) {
            select.options[select.options.length] = new Option(arrunique[i][j]);
        };
    };
}
function createList(arrunique, arrayout) {
    



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: