<table>
<tr>
<td width="120" height="25" bgcolor="#AEAEDE" onmouseover="javascript: this.style.backgroundColor = '#DEDEDE';" onmouseout="javascript: this.style.backgroundColor = '#AEAEDE';">
</td>
</tr>
</table>
<tr>
<td width="120" height="25" bgcolor="#AEAEDE" onmouseover="javascript: this.style.backgroundColor = '#DEDEDE';" onmouseout="javascript: this.style.backgroundColor = '#AEAEDE';">
</td>
</tr>
</table>
解决方案 »
- JS在火狐里没效果
- 谁有像网易相册,网易博客里的编辑器里的批量上传的源代码?
- 非常非常非常紧急的问题
- C#客户端 怎么调用 java web service
- 如何读取表格a的父节点的父节点的行数?在线等。。。。
- 如何使用正则表达式进行替换,急急!!
- 尝试用 innerHTML 改变<body>内所有中文字的颜色,就差一点了
- 怎么控制这种iframe的高度?
- http://www.csdn.net/expert/topic/1075/1075694.xml?temp=.4609033(帮帮我吧!!!)
- 这句话什么意思啊?<meta http-equiv="pragma" content="no-cache">
- 我想页面1秒钟alert一下,js不熟悉,请指教
- innerHTML?急?在线?
function
scbg(objRef, state)
{
objRef.style.backgroundColor = (1 == state) ? '#333333' : '#000000'; return;
}
在html中,用table调用!
<table width="100%" border="0" cellpadding="0" cellspacing="0" onMouseOut="scbg(this, 0);" onMouseOver="scbg(this, 1);" >
<!--
var curOverRow=null;
var curClkRow=null;
function mouseover(objTr){
if(objTr==curClkRow) return false;
if(curOverRow)
curOverRow.style.backgroundColor="white";
curOverRow=objTr;
objTr.style.backgroundColor="#00FF7F";
}
function rowClick(objTr){
if(curClkRow){
curClkRow.style.backgroundColor="white";
curClkRow.style.color="black";
}
curClkRow=objTr;
objTr.style.backgroundColor="#0000CD";
objTr.style.color="white";
curOverRow=null
}//-->
</script>
<style type="css/text">
td{text-align:center}
</style>
<body>
<script language="JavaScript">
<!--
document.write("<table id='tbTest' cellpadding=0 width=200 cellspacing=0 border=1 style='border-collapse:collapse ' borderColor='#111111'>");
for(var i=0;i<4;i++){
document.write("<tr height=30 onmouseover='mouseover(this)' onclick='rowClick(this)'><td width=50 align=center>"+(i+1)+"-1</td><td align=center width=50>"+(i+1)+"-2</td><td align=center width=50>"+(i+1)+"-3</td><td align=center width=50>"+(i+1)+"-4</td></tr>");
}
document.write("</table>");
//-->
</script>
</body>
<SCRIPT LANGUAGE="JavaScript">
var e = document.all.aaaaa;
e.onmouseover = function()
{
this.style.backgroundColor = "#80FFF0";
}
e.onmouseout = function()
{
this.style.backgroundColor = "";
}
</SCRIPT>
<button onclick="document.all('aaaaa').bgColor='red'">red</button>