[英]How to add javascript script tag in XSL file
I want to add code shown below in my XSL but it is not displaying properly when I generate it in HTML. 我想在我的XSL中添加下面显示的代码,但是当我在HTML中生成它时,它无法正确显示。
<head>
<script src='https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827'> </script>
</head>
The script tag is not closing properly when generated in HTML. 在HTML中生成时,脚本标记未正确关闭。
Perhaps you are saying you are getting this as the output: 也许您是说您正在获得此作为输出:
<script src="https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827"/>
When, actually, you are expecting this: 实际上,您何时期望这样:
<script src="https://js.dmtry.com/channel.js#gid:3299;advid:899;pid:389827"></script>
If so, try specifying the output method in your XSLT as "html", like so: 如果是这样,请尝试在XSLT中将输出方法指定为“ html”,如下所示:
<xsl:output method="html" />
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.