本文共 638 字,大约阅读时间需要 2 分钟。
for (var i = 1; i < count + 1; i++) { if ($("#inputlist-" + i).val() == "" || user == "") { $.toptip("标题或选项不能为空"); console.log("不会提交表单,退出函数"); return; } else { ajaxPram["inputList_"+i] = $("#inputlist-" + i).val(); } }
//动态创建id或者类名 ''+
//src实现字符串与变量串接 src=" /wx-order' + response.data.contents[i]["canteenIcon"] + '"
//js中实现中文传参,需加\'转义字符 onclick="gotocontent(\''+ (response.data.contents[i]["sellerId"])+'\',\''+ response.data.contents[i]["sellerName"]+'\',\''+ response.data.contents[i]["sellerAddress"]+'\')"
转载地址:http://jxnws.baihongyu.com/