<html>
<head>
</head>
<body>
<script language="javascript">
function chgColor(obj)
{
var theTable = document.getElementById("myTable");
var theTds = theTable.cells;
for(var i=0;i<theTds.length;i++)
{
if(theTds[i]!=obj)
theTds[i].bgColor="white";
else
theTds[i].bgColor="#0069AD";
}
}
</script>
<table id="myTable">
<tr>
<td onclick="chgColor(this);" >シラ1111111111 </TD>
<td onclick="chgColor(this);" >メメ2222222222 </TD>
<td onclick="chgColor(this);" >ア・333333333 </TD>
<td onclick="chgColor(this);" >カ。4444444444 </TD>
</tr>
</table>
</body>
</html>如何吧上面的颜色变为字体,这样就可以了!
<head>
</head>
<body>
<script language="javascript">
function chgColor(obj)
{
var theTable = document.getElementById("myTable");
var theTds = theTable.cells;
for(var i=0;i<theTds.length;i++)
{
if(theTds[i]!=obj)
theTds[i].bgColor="white";
else
theTds[i].bgColor="#0069AD";
}
}
</script>
<table id="myTable">
<tr>
<td onclick="chgColor(this);" >シラ1111111111 </TD>
<td onclick="chgColor(this);" >メメ2222222222 </TD>
<td onclick="chgColor(this);" >ア・333333333 </TD>
<td onclick="chgColor(this);" >カ。4444444444 </TD>
</tr>
</table>
</body>
</html>如何吧上面的颜色变为字体,这样就可以了!
.sFont{font-size:7pt}
.bFont{font-size:10pt}
</style>
<table>
<tr bgcolor="#D7EBFF" class='sFont' onClick="cFont(this);">
<td >nrothsnow</td>
<td>塞北的雪</td>
</tr>
</table>
<script language='javascript'>
function cFont(e){
e.className='bFont';
}
</script>
<script language='javascript'>
function showjyoukenbangou(jyoukenbangou){
document.myform.jyoukenbangou.value=jyoukenbangou;
document.myform.action = "JyoukenBangou";
document.myform.submit();
}
</script>
中执行的好像无法执行你们的那个obj!
<script language="javascript">
function chgColor(obj)
{
if(!obj) return;
obj.style.fontSize="20";
}
</script>
<table id="myTable">
<tr>
<td onclick="chgColor(this);" >シラ1111111111 </TD>
<td onclick="chgColor(this);" >メメ2222222222 </TD>
<td onclick="chgColor(this);" >ア・333333333 </TD>
<td onclick="chgColor(this);" >カ。4444444444 </TD>
</tr>
</table>
</body>