eval('owin.document.write("<td>"+document.'+objImg[0].name+'"</td>")');
请问这个js脚本为何一直报错,说缺少')'呢

解决方案 »

  1.   

    eval('owin.document.write("<td>document.objImg[0].name</td>")'); 
      

  2.   

    那 objImg[0].name这个变量所代表的真正信息就取不到了,只能显示objImg[0].name这个信息
      

  3.   

    查出来了eval('owin.document.write("<td>"+"'+document.objImg[0].name+'"+"</td>")');
    为正解,不知同仁还有其他方法没?