这个函数为什么只执行一条语句? document.getElementById("mc").rows[0].cells[2].style.background = 'url("images/biaotiZi-100x25-2.gif")'; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果不加上“'”,那么就当成调用url()函数。 function mm() { document.getElementById("mc").rows[0].cells[2].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";document.getElementById("mc").rows[0].cells[1].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";} 也可以使用document.getElementById("mc").rows[0].cells[1].style.backgroundImage = "images/.....gif"; function mm() { document.getElementById("mc").rows[0].cells[2].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')"; document.getElementById("mc").rows[0].cells[1].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')"; } 应该是的 function mm() { document.getElementById("mc").rows[0].cells[2].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')"; document.getElementById("mc").rows[0].cells[1].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')"; } 高分求助:一键复制页面里的图片的问题 数据table之间的移动(可能没解释清楚,请进帮忙) 如何动态删除li标签 js面向对象编程遇到个问题,求解惑。。。 我最近打算好好学JAVASCRIPT,请大家推荐有什么好的入门书. 正则关于$的问题。 555,搞不定。大家帮我看看这段代码。老是出错。 请问一个小问题,高分相送 超级郁闷的问题! 急!!请高手帮忙 submit()两次提交的问题。 JS代码延迟执行
{
document.getElementById("mc").rows[0].cells[2].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";
document.getElementById("mc").rows[0].cells[1].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";
}
document.getElementById("mc").rows[0].cells[1].style.backgroundImage = "images/.....gif";
{
document.getElementById("mc").rows[0].cells[2].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";
document.getElementById("mc").rows[0].cells[1].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";
} 应该是的
{
document.getElementById("mc").rows[0].cells[2].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";
document.getElementById("mc").rows[0].cells[1].style.backgroundImage="url('images/biaotiZi-100x25-2.gif')";
}