本文介绍了我可以放置< script>< / script>里面< script>< / script>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
所以我需要在一些脚本标签中加载一个包含在一组脚本标签中的广告是否可能? 当你使用< script> HTML标记时,里面的内容被视为带引号(字面)的字符串,所以内部< / script> 标签里面被视为结束标签而不是字符串的一部分。所以你不能直接在脚本部分使用标签。
如果你必须,user2310289的方法是有效的,或者你也可以使用字符串连接 - 例如: < / sc+ript>);
So I need to load a advert contained in a set of script tags inside some script tags is it possible ?
解决方案When you use a <script> HTML tag what is inside is treated as a quoted (literal) string, so the inner </script> tag inside is treated as a closing tag rather than as a portion of the string. So you cannot directly use the tag inside a script section.
If you must, user2310289's approach is valid or you could also use string concatenation - eg: "</sc"+"ript>");
更多推荐
我可以放置< script>< / script>里面< script>&a
发布评论