<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="javaScript"> function changecolor(a)
{
if (document.frmbody.testarea.value=="")
{
a.style.backgroundColor = "red";
}else
a.style.backgroundColor = "white"
}</script>
</HEAD><BODY>
<form name= "frmbody">
<table>
<tr>
<th id= "th1" >Test</th>
<th>
<input type="input" name="testarea"></input>
</th>
</tr>
<tr>
<th>
<input type="button" name="btnReg" value="Submit"
onclick=changecolor(document.getElementById("th1"))></input>
</th>
</tr>
</table>
</form>
</BODY>
</HTML>
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
<script language="javaScript"> function changecolor(a)
{
if (document.frmbody.testarea.value=="")
{
a.style.backgroundColor = "red";
}else
a.style.backgroundColor = "white"
}</script>
</HEAD><BODY>
<form name= "frmbody">
<table>
<tr>
<th id= "th1" >Test</th>
<th>
<input type="input" name="testarea"></input>
</th>
</tr>
<tr>
<th>
<input type="button" name="btnReg" value="Submit"
onclick=changecolor(document.getElementById("th1"))></input>
</th>
</tr>
</table>
</form>
</BODY>
</HTML>
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货