不允许的关键字符。在 codeigniter 中通过 jquery 在框架中加载嵌入代码时出错?
Disallowed Key Characters. error while loading embed code in frame through jquery in codeigniter?
我正在通过 jQuery 将我的嵌入代码加载到 iframe 中,就像这样
<div id="My-page" style="width:900px; height:900px; position: absolute;overflow-x:hidden !important;-webkit-overflow-scrolling:touch !important;" class="iframely-widget-container">
<script>
$("#My-page").empty().append($("<iframe/>", {
src: "http://localhost/flipbeets3.0.com/get-embedded-code/abdul/p~2~2~2?slug-hash=HrFBx&default-tab=result&host=http%3A%2F%2Fcodepen.io"
}));
</script>
</div>
显示不允许的关键字符错误
当您通过 javascript 加载时,无需对 URL 进行编码。此代码应该适合您:
<div id="My-page" style="width:900px; height:900px; position: absolute;overflow-x:hidden !important;-webkit-overflow-scrolling:touch !important;" class="iframely-widget-container"></div><script>$("#My-page").empty().append($("<iframe/>", {src: "http://localhost/flipbeets3.0.com/get-embedded-code/abdul/p~2~2~2?slug-hash=HrFBx&default-tab=result&host=http://codepen.io"}));</script>
我正在通过 jQuery 将我的嵌入代码加载到 iframe 中,就像这样
<div id="My-page" style="width:900px; height:900px; position: absolute;overflow-x:hidden !important;-webkit-overflow-scrolling:touch !important;" class="iframely-widget-container">
<script>
$("#My-page").empty().append($("<iframe/>", {
src: "http://localhost/flipbeets3.0.com/get-embedded-code/abdul/p~2~2~2?slug-hash=HrFBx&default-tab=result&host=http%3A%2F%2Fcodepen.io"
}));
</script>
</div>
显示不允许的关键字符错误
当您通过 javascript 加载时,无需对 URL 进行编码。此代码应该适合您:
<div id="My-page" style="width:900px; height:900px; position: absolute;overflow-x:hidden !important;-webkit-overflow-scrolling:touch !important;" class="iframely-widget-container"></div><script>$("#My-page").empty().append($("<iframe/>", {src: "http://localhost/flipbeets3.0.com/get-embedded-code/abdul/p~2~2~2?slug-hash=HrFBx&default-tab=result&host=http://codepen.io"}));</script>