Uncaught SyntaxError: Unexpected token ILLEGAL
I am filing my javascripts to external files. with this process I came across the following error in Chrome:
Uncaught SyntaxError: Unexpected token ILLEGAL Line:2
$(document).bgStretcher({
#if($CURRENTPAGE.pageId==23)
images: ['/media/backgrounds/homepage/homepage.jpg'], imageWidth: 1860, imageHeight: 1000
#else
images: ['/media/backgrounds/Dreamjob_coachfoto_'+pad(randomnumber,3)+'.jpg'], imageWidth: 1860, imageHeight: 1000
#end
});
Can anyone help me?
正确的语法(图像上的语法看起来很奇怪,但我找不到bgstretcher的完整文档抱歉)
$(document).bgStretcher({
if($CURRENTPAGE.pageId==23) {
images: ['/media/backgrounds/homepage/homepage.jpg'], imageWidth: 1860, imageHeight: 1000
}
else {
images: ['/media/backgrounds/Dreamjob_coachfoto_'+pad(randomnumber,3)+'.jpg'], imageWidth: 1860, imageHeight: 1000
}
});
使用Firefox进行调试(使用Firebug),它会给你提供比Chrome更多的信息,这种类型的错误。
链接地址: http://www.djcxy.com/p/45982.html