我的xsl模板非常复杂,里面有很多需要js的。本来(.htm时)都挺好的,
我加入了xsl语言,改成xsl文件后,当用它格式化一个xml文件时,出错。
就连if(a>b){alert("liu")}
都出错。说什么:缺少')'真的不知道该如何解决高手指点。
我加入了xsl语言,改成xsl文件后,当用它格式化一个xml文件时,出错。
就连if(a>b){alert("liu")}
都出错。说什么:缺少')'真的不知道该如何解决高手指点。
解决方案 »
- 在网页中,如何实现把txt文件导入到oracle
- asp.net+datagrid +aspnetpager+分页存储过程如何导出EXCEL
- 网站打开时出现其他网站的链接,但在IE8中可以正常访问,以下版本就不行,请大高手帮忙诊断!莫非是传说中的植入病毒
- asp.net2.0 主菜单下的挂的二级菜单弹不出来
- 使用Context.RewritePath伪静态本地正常放服务器就找不到该页是怎么回事?
- 什么是委托??
- 关于Session的一个问题,说是没有索引器
- 水晶报表安装不能正常预览!
- assert单元测试。这个类怎么写单元测试用例和方法哈
- ASP.NET怎么看具体调试信息
- 新手简单问题:datagrid中怎样实现根据用户的不同而是否显示删除按钮
- 折腾半天了,还是来请教大家吧!
<SCRIPT LANGUAGE="javascript">
<xsl:comment><![CDATA[function GetIEVersion()
{
try
{
if(!window.clientInformation)return false;
if(window.clientInformation.appName.toLowerCase()!="microsoft internet explorer")return false;
if(window.clientInformation.appVersion.toLowerCase().indexOf("msie")==-1)return false;
var a=window.clientInformation.appVersion.toLowerCase().split(";");
for(var i=0;i<a.length;i++)
{
a[i]=a[i].replace(" ","");
if(a[i].indexOf("msie")==0)
{
var version=a[i].substr(4,a[i].indexOf(".")-2);
return version;
}
}
}
catch(exception)
{
}
return false;
}window.IEVersion=GetIEVersion();if(parseInt(window.IEVersion)<6)document.write("<style>textarea.content { behavior:url('/Expert/xsl/tacontent.htc')}</style>");
function mailto1()
{
document.mailto.email.value='';
var tmpText=prompt('请输入您朋友的EMail:',document.mailto.email.value);
if(tmpText){
document.mailto.email.value = tmpText;
document.mailto.submit();
}
}]]>//</xsl:comment>
</SCRIPT>
<script>
<![CDATA[
if(a>b){alert("liu")}
]>
</script>不过你要分清楚你的js文件在服务器端执行还是在客户端
<script language="javascript">
var picN=-1
function first(){
picN=0
showPict();
}
function back(){
picN--
if(picN<0) picN=0;
document.albumlist.albumtitle.selectedIndex=picN+2;
showPict();
}
function forw(){
picN++
if(picN>0) picN=0
document.albumlist.albumtitle.selectedIndex=picN+2;
showPict();
}
function last(){
picN=sum_photo
showPict();
}
function showPict(){
switch (picN) {
case 0: CardCode="1099276339.jpg"; break; }
document.cardpict.src="http://loveimg.163.com/myphotoes/78/50/yangming_8888/"+CardCode;
}
function showALBUM() {
if (document.albumlist.albumtitle.selectedIndex>=2){
picN = document.albumlist.albumtitle.selectedIndex-2;
showPict();
}
}
function openPict()
{
if (picN==-1) { document.albumlist.albumtitle.selectedIndex=2;showALBUM();}
switch (picN) {
case 0: CardCode="1099276339.jpg"; break;
}
srcIMG="http://loveimg.163.com/myphotoes/78/50/yangming_8888/"+CardCode;
var newWin=window.open(srcIMG,"myalbum","status=no,scrollbars=1,resizable=1,width=800,height=600");
}</script>
这次提示的错误是:语法错误<script language="javascript">
<xsl:comment>
<![CDATA[
var picN=-1
function first(){
picN=0
showPict();
}
function back(){
picN--
if(picN< 0) picN=0;
document.albumlist.albumtitle.selectedIndex=picN+2;
showPict();
}
function forw(){
picN++
if(picN > 0) picN=0
document.albumlist.albumtitle.selectedIndex=picN+2;
showPict();
}
function last(){
picN=sum_photo
showPict();
}
function showPict(){
switch (picN) {
case 0: CardCode="1099276339.jpg"; break; }
document.cardpict.src="http://loveimg.163.com/myphotoes/78/50/yangming_8888/"+CardCode;
}
function showALBUM() {
if (document.albumlist.albumtitle.selectedIndex>=2){
picN = document.albumlist.albumtitle.selectedIndex-2;
showPict();
}
}
function openPict()
{
if (picN==-1) { document.albumlist.albumtitle.selectedIndex=2;showALBUM();}
switch (picN) {
case 0: CardCode="1099276339.jpg"; break;
}
srcIMG="http://loveimg.163.com/myphotoes/78/50/yangming_8888/"+CardCode;
var newWin=window.open(srcIMG,"myalbum","status=no,scrollbars=1,resizable=1,width=800,height=600");
}
]]>//</xsl:comment>
</script>
<![CDATA[]>
</script>
即可