[英]How can i insert this javascript code to a php block to run as a block (in Drupal 7)?
我如何将此JavaScript代码插入php块? 我想在php块中运行此javascript。
<script src="http://www.example.com/index.php?section=serve&id=1&output=js</script>
应该是这样的:
<script src="http://www.example.com/index.php?section=serve&id=1&output=js" language="javascript" type="text/javascript"></script>
没关系,您正在使用php或其他工具。 事实是,只要浏览器看到此标记,它就会从"src"
URL加载脚本文件并执行文件中的所有内容。 因此,每当您要将脚本加载到html文档中时,都应放置此标签。
希望它可以帮助干杯
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.