"意外标记else"在美元each()
"Unexpected token else" inside $.each()
由于某种原因,我得到了这个脚本的Unexpected token else
错误:
.each(rowValue.columns, function(columnKey, columnValue){
if(typeof rowValue.type !== 'undefined' && rowValue.type == 'header'){
$(this).append(
$('<div></div>').prop('name', columnValue.name).text(columnValue.text).addClass('orangeStatusTwoThirdsCell blueCellOverride').applyHTMLclasses(columnValue.classes);
);
}
else if(columnValue.inputType == 'textarea'){
$(this).append(
$('<textarea></textarea>').prop('rows', columnValue.textareaRows).prop('id', columnValue.id).addClass('fillContainer inputAsCell hideScrollbar').applyHTMLclasses(columnValue.classes);
);
}
else if(columnValue.inputType == 'select'){
$(this).append(
$('<select></select>').prop('id', columnValue.id).addClass('fillContainer inputAsCell').applyHTMLclasses(columnValue.classes).append(function(){
if(typeof columnValue.valuelessSelectOption !== 'undefined'){$(this).append($('<option/>').text(columnValue.valuelessSelectOption));}
});
);
}
});
我是$.append()
这些动态构建的元素
删除;
if(typeof rowValue.type !== 'undefined' && rowValue.type == 'header'){
$(this).append(
$('<div></div>').prop('name', columnValue.name).text(columnValue.text).addClass('orangeStatusTwoThirdsCell blueCellOverride').applyHTMLclasses(columnValue.classes);
);
}
你在几行之后有同样的问题
相关文章:
- 铬:“;未捕获的语法错误:意外的标记:"
- jquery.each(第2行)添加背景色
- 可以设置“;文件名"发生错误时显示的内联脚本标记的
- JS表单提交"无法使用Chrome数据保护程序加载此页面.尝试重新加载页面.调试信息:POST CISmtuK
- 检测电话窃听,即:<a href="电话:xxx">在UIWebview上
- 如何使用jQuery each分离字符串中的元素
- 使用“+="操作人员
- //而不是在src=“”上使用http://"属性
- "未捕获的语法错误:意外的标记}"
- 可以<脚本类型=“;text/javascript”>window.location=“/"</
- "实例范围”;TypeScript类的getter/setter
- Javascript复选框函数:;缺少:在属性id之后"
- "“;变量未引用正确的对象
- "日期“;AJAX请求返回的类型值未定义
- 得到"TypeError:无法读取属性'filename'未定义的“;调用“npm start
- Soundcloud api"未捕获的类型错误:无法读取属性'uri'“未定义”;
- "工具提示"jQuery插件坏了
- "this.collection.each不是函数;.应该'它不是简单地说“;每个”;
- 使用函数"each"创建多个数组;从jQuery
- Angular JS中的DOM查询$(“.myclass") . each()的选择