Php 执行<;脚本src="//www.com/?variables"&燃气轮机;内部<;部门>;由AJAX检索
我有一行代码,我正试图在一个ajax加载的div中运行:Php 执行<;脚本src="//www.com/?variables"&燃气轮机;内部<;部门>;由AJAX检索,php,javascript,ajax,jquery,Php,Javascript,Ajax,Jquery,我有一行代码,我正试图在一个ajax加载的div中运行: <noscript><p>Coupons powered by <a href="http://www.coupons.com/">Coupons.com</a></p></noscript> <script type="text/javascript" src="//bcg.coupons.com/?scriptId=47051&bid
<noscript><p>Coupons powered by <a href="http://www.coupons.com/">Coupons.com</a></p></noscript>
<script type="text/javascript" src="//bcg.coupons.com/?scriptId=47051&bid=1293740001&format=718x940&bannerType=3"></script>
优惠券由
以下是我的一些方法:
我不断得到成功的回调,但内容没有加载到div中
谢谢 使用
createElement
、appendChild
和friends生成并插入脚本元素。不要为此使用innerHTML
。假设//bcg.coups.com/?scriptId=47051&bid=1293740001&format=718x940&bannerType=3
返回成功执行的javascript,您所关心的问题,是注入的脚本标记没有将文件加载到浏览器中吗?感谢@Quentin的响应,我通过这种方法获得了成功的回调,但内容没有加载。看我的书