数组不是这样定义的。
应该是var varTempArray =new Array();

解决方案 »

  1.   

    请注意修改这一行
    document.write("<tr><td height=30 width=120 bgcolor="+thiscolor+"  onMouseOver='document.bgcolor=\""+thiscolor+"\";'>"+thiscolor+"</td></tr>");看清楚修改的地方就可以了,这个是javascipt语言要求的,“”与‘’相间使用,为我为什么,我只能告诉你是规范而已。因为这个是在字符串中使用的,为了能在输出中保持“”
    所以我用了转义字符(\).
      

  2.   

    自己可以根据alert的输出看到我说的意思。
      

  3.   

    document.bgColor,大小写很重要,当然 "  '  \" 也是必须注意的地方