Chrome 的 Javascript 控制台中的意外标识符
Unexpected Identifier in Chrome's Javascript console
<div id="my-page" style="width:100%; height:640px; position: absolute;overflow-x:hidden !important;-webkit-overflow-scrolling:touch !important;" class="iframely-widget-container">
<script>
$("#my-page").html('<iframe style="
top: 0 px; left: 0 px; width: 101 % ; height: 100 % ; position: absolute;
" mozallowfullscreen="
true " webkitallowfullscreen="
true " allowfullscreen="
true " src="
http: //www.flipbeets.com/get-embedded-code/zimbabwecricket/p~1~2~1?slug-hash=HrFBx&default-tab=result&host=http%3A%2F%2Fcodepen.io" class="iframely-widget iframely-iframe" frameborder="0"></iframe>');
</script>
</div>
Chrome 的 Javascript 控制台中的意外标识符。
(注意,代码使用此格式化程序整理。
只是尝试将字符串引号修改为'
如下:
$("#my-page").html('<iframe style="t...></iframe>')
您需要删除双引号 "。您也不能在 .html(") 和样式定义中使用它。您应该一起使用 ' 和 "。
<div id="my-page" style="width:100%; height:640px; position: absolute;overflow-x:hidden !important;-webkit-overflow-scrolling:touch !important;" class="iframely-widget-container">
<script>
$("#my-page").html('<iframe style="
top: 0 px; left: 0 px; width: 101 % ; height: 100 % ; position: absolute;
" mozallowfullscreen="
true " webkitallowfullscreen="
true " allowfullscreen="
true " src="
http: //www.flipbeets.com/get-embedded-code/zimbabwecricket/p~1~2~1?slug-hash=HrFBx&default-tab=result&host=http%3A%2F%2Fcodepen.io" class="iframely-widget iframely-iframe" frameborder="0"></iframe>');
</script>
</div>
相关文章:
- 未捕获的SyntaxError:具有服务器变量的意外标识符
- Chrome 的 Javascript 控制台中的意外标识符
- AngularJS:POST $http意外标识符
- jQuery.ajax Uncatch SyntaxError: 意外标识符
- Ajax响应成功,但无法使用数据(未捕获语法错误:意外标识符)
- 一个javascript函数导致“;意外标识符”;来自不同函数的错误
- 未捕获的语法错误:if/else上的意外标识符
- 使用带有es6的文件时,服务器端SyntaxError意外标识符
- 书签时 JavaScript 意外标识符
- 输入标记的意外标识符
- JavaScript + PHP 未捕获的语法错误意外标识符
- 未捕获的语法错误:带有 .append() 字符串的意外标识符
- 意外标识符每日奖励功能
- 未捕获的语法错误:Java 中使用 Grails 的意外标识符
- 尝试使用 javascript/jQuery 插入 HTML 时出现意外标识符
- jquery 中的“未捕获语法错误:意外标识符”错误
- 意外标识符 javascript
- JSON href .append 意外标识符
- 函数调用的意外标识符
- 浮点:系列是选项中的意外标识符