简单问题………… 最好放到<head>中,放到<body>中的JS有可能执行不到。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 多谢楼上提醒……不过其实叙述问题很复杂,我将它简单化下如test.xml<pagehome><profili><sp>2</sp></profile></pagehome>2.jsalert(1);test.xsl<?xml version="1.0" encoding="UTF-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="text()"> <xsl:value-of /> </xsl:template> <xsl:template match="/"><html><head><xsl:element name="script"><xsl:attribute name="language">javascript</xsl:attribute><xsl:attribute name="src">/weblog/blogjs/<xsl:value-of select="home/profile/sp"/>.js</xsl:attribute></xsl:element><META http-equiv="Content-Type" content="text/html; charset=UTF-8"/></head><body></body></heml></xsl:template></xsl:stylesheet>这样是可以执行的但test.xsl<?xml version="1.0" encoding="UTF-8" ?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="text()"> <xsl:value-of /> </xsl:template> <xsl:template match="/"><html><head><META http-equiv="Content-Type" content="text/html; charset=UTF-8"/></head><body><xsl:element name="script"><xsl:attribute name="language">javascript</xsl:attribute><xsl:attribute name="src">/weblog/blogjs/<xsl:value-of select="home/profile/sp"/>.js</xsl:attribute></xsl:element></body></heml></xsl:template></xsl:stylesheet>这样不能执行我必须将js在body间调用,因为里面有操作body的语句 Jquery表单验证插件-JSFormChecker 一个div层随着另一个div层的移动而移动代码 Javascript变量作用域问题 新手问一个关于jquery问题,各位进来帮忙回答一下谢谢。 如何实现整个框架网页刷新1次 关于生成层 setTimeout小问题 怎样点击按钮后关闭其它我想要页面?? 图片播放类:ImageSlide.iclass.js ~~~~~~JQuery如何去掉字符串里面的空字符?~~~~~~~~~~~ 怎么控制输出位置 為何每要刷新一下才能下載.
不过其实叙述问题很复杂,我将它简单化下如
test.xml
<pagehome>
<profili><sp>2</sp></profile>
</pagehome>2.js
alert(1);test.xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="text()">
<xsl:value-of />
</xsl:template>
<xsl:template match="/">
<html>
<head>
<xsl:element name="script">
<xsl:attribute name="language">javascript</xsl:attribute>
<xsl:attribute name="src">/weblog/blogjs/<xsl:value-of select="home/profile/sp"/>.js</xsl:attribute>
</xsl:element>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
</body>
</heml>
</xsl:template>
</xsl:stylesheet>这样是可以执行的但
test.xsl
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="text()">
<xsl:value-of />
</xsl:template>
<xsl:template match="/">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<xsl:element name="script">
<xsl:attribute name="language">javascript</xsl:attribute>
<xsl:attribute name="src">/weblog/blogjs/<xsl:value-of select="home/profile/sp"/>.js</xsl:attribute>
</xsl:element></body>
</heml>
</xsl:template>
</xsl:stylesheet>
这样不能执行
我必须将js在body间调用,因为里面有操作body的语句