高手帮忙,脚本小问题。
代码如下,
<style>
<!--
.content1{background-color:#aabbcc}
-->
</style>
<!--
function s_change()
{
for(i=1;i<=5;i++)
{
this.document.all.title[i].className="content1";//提示这句有问题,怎么改??
}
//写成下面的形式可以,但太复杂,我还是想得到上面的形式。
this.document.all.item1.className="content1";
this.document.all.item2.className="content1";
this.document.all.item3.className="content1";
this.document.all.item4.className="content1";
this.document.all.item5.className="content1";
}
-->
</script>
<body onload="s_change()">
<table>
<tr>
<td id="item1">公司简介</td>
<td id="item2">服务项目</td>
<td id="item3">成功案例</td>
<td id="item4">解决方案</td>
<td id="item5">联系方式</td>
</tr>
</table>
</body>
请各位高手不吝赐教。一旦解决,立即结帖。