使用JQuery动态生成Html控件

来源:互联网 发布:七月算法 百度云 编辑:程序博客网 时间:2024/04/25 16:34
///*****使用JQuery动态生成Html控件 Begin*****///           
            //var strM = "this is {cnt} , {cnt}, {cnt}";
            //在此将字母a全部替换成字母A
//            var result = strM.replace(/{cnt}/g, "2");


//            var tbody = $("table");


//            var htmlCode = 
//'<tr name=\"article_added\">\
// <td>\
// <select name=\"\" id=\"article_{rowCnt}_logic_1\">\
// <option value=\"\" selected=\"true\">并且</option>\
// <option value=\"\">或含</option>\
// </select>\
// </td>\
// <td>\
// <select name=\"\" id=\"article_{rowCnt}_sel_1\">\
// <option value=\"\" selected=\"true\">全文</option>\
// <option value=\"\">关键词</option>\
// </select></td>\
// <td><input type=\"text\" id=\"article_{rowCnt}_value_1\"/></td>\
// <td>\
// <select name=\"\" id=\"article_{rowCnt}_special_1\">\
// <option value=\"\" selected=\"true\">并含</option>\
// <option value=\"\">或含</option>\
// </select></td>\
//</tr>';


//            var a = $(htmlCode);
//            tbody.append(a);
        ///*****使用JQuery动态生成Html控件 End  *****///
原创粉丝点击