一个弱弱的问题,<tr><td>改变背景色. 要有事件,才可以啊要不就是onload要不就是onmouseover等等,才回激发变颜色 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <table><tr id="tr1" bgcolor="#999999"><td id="aaa" width="24" >aaa</td><td bgcolor="#006633">ccc</td></tr></table><script type="text/javascript"><!--function fun(){document.getElementById("tr1").style.backgoundColor="#Fc3300";document.getElementById("aaa").style.backgoundColor="#ffffff";}//--></script><form name="form1" method="post" action=""> <input type="button" name="button" onClick="fun()" value="aa"></form>这样算有事件了吗,也还不行。 document.getElementById("tr1").style.background="#Fc3300";改成BACKGROUND document.getElementById("tr1").style.backgoundColor="#Fc3300";backgoundColor错了,应该是backgroundColor <SCRIPT>function fnGetId(){document.getElementById("oDiv1").style.backgroundColor="#000000";//alert("sfsa");}</SCRIPT><DIV ID="oDiv1">Div #1</DIV><DIV ID="oDiv2">Div #2</DIV><DIV ID="oDiv3">Div #3</DIV><INPUT TYPE="button" value="kao" onclick="javascript:fnGetId()"> background 这个属性才是对的 呵呵,楼上对得!sytle.background才是对得!lz注意了! <body onload="abb()"><table><tr><td id="aaa" bgcolor=blue >aaa</td><td id="ccc" bgcolor="#006633">ccc</td></tr></table></body><script type="text/javascript"><!--function abb(){document.getElementById("aaa").style.background="red";document.getElementById("ccc").style.background="yellow";}//--></script> 哪位高手介绍下如何用js将数组转化为csv文件? 谁会的?帮忙啊! js中嵌用asp 代码 ,怎么实现?? 不会javascritp希望大家说明: 请问在用onClick时 如何能够让它在鼠标移动上去时显示手的图标 就向其他链接一样 变量如何存放在json格式的数组中 问了n个问题都没人回答。兄弟们帮忙看一眼阿。 框架问题? 请教一个问题。 请教大神指点“无障碍浏览”功能的问题 表单不能完成验证? 如何确定frame的滚动条滚动距离
<tr id="tr1" bgcolor="#999999">
<td id="aaa" width="24" >aaa</td>
<td bgcolor="#006633">ccc</td>
</tr>
</table>
<script type="text/javascript">
<!--
function fun(){
document.getElementById("tr1").style.backgoundColor="#Fc3300";
document.getElementById("aaa").style.backgoundColor="#ffffff";
}
//-->
</script>
<form name="form1" method="post" action=""> <input type="button" name="button" onClick="fun()" value="aa"></form>这样算有事件了吗,也还不行。
改成BACKGROUND
function fnGetId(){
document.getElementById("oDiv1").style.backgroundColor="#000000";
//alert("sfsa");
}
</SCRIPT>
<DIV ID="oDiv1">Div #1</DIV>
<DIV ID="oDiv2">Div #2</DIV>
<DIV ID="oDiv3">Div #3</DIV>
<INPUT TYPE="button" value="kao" onclick="javascript:fnGetId()">
sytle.background才是对得!
lz注意了!
<table>
<tr>
<td id="aaa" bgcolor=blue >aaa</td>
<td id="ccc" bgcolor="#006633">ccc</td>
</tr>
</table>
</body>
<script type="text/javascript">
<!--
function abb(){
document.getElementById("aaa").style.background="red";
document.getElementById("ccc").style.background="yellow";
}
//-->
</script>