日期:2014-05-18  浏览次数:20718 次

高手帮我看看这段那里有错
var   scrollWidth   =   200;   scrollHeight   =   220;
var   aimLeft   =   5;   aimTop   =   5;
var   backColor   =   "#aadfff ";
var   nowTextId   =   1;
var   textArray   =   new   Array();
var   textHidden   =   "text1 ";   textVisible   =   "text2 ";


document.write( " <div   id   =   'main_div '   style   =   'position:absolute;   width: " '
+scrollerWidth+ ";   height: "+scrollerHeight+ ";   overflow:hidden;   background-color: "
+backColor+ ";   clip:rect(0   "+scrollerWidth+ "   "+scrollerHeight+ "   0);   visibility:visible '> "
+ " <div   id   =   'text1 '   style   =   'position:absolute;   left: "+aimLeft+ ";   width: '
+scrollerWidth+ ";   visibility:visible '> </div> "
+ " <div   id   =   'text2 '   style   =   'position:absolute;   left: "+aimLeft+ ";   width " '
+scrollerWidth+ ";   visibility:visible '> </div> "
+ " </div> ");

------解决方案--------------------
document.write( " <div id = 'main_div ' style = 'position:absolute; width: " '
这里的最后面,是你发错了吗? '和 "反了
------解决方案--------------------
眼睛果然很尖。引号的使用套几层就晕了。
嘴还找一个带颜色的编辑器,比较号召这类语法错误。
逻辑错误只能调试了。