在页面的html中 id=om'+i+''+s+' 会有效?

解决方案 »

  1.   

    content+='<td bgcolor=#ffffff width=35 align="center" id=om'+i+''+s+'></td>';
    这是写在JS中的
      

  2.   

    id=om'+i+''+s+'有效,但是i和s不会作为js变量,而是普通的字符
      

  3.   

    在js中:document.all("om"+i+s).bgColor="000000";
      

  4.   

    eval('document.getElementById(om'+i+s+').bgColor="000000"')
      

  5.   

    eval('document.getElementById(om'+i+s+').bgColor="000000"')
    document.all("om"+i+s).bgColor="000000";
    用了就出报错了