<!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="">
</head>
<style type="text/css">
<!--
.b{
color:red;
}
.a{
color:blue;
}--></style><body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%">
<input name="amount" type="text" id="amount" onFocus="clew();" onblur="clew1();" value="aaa" size="20" maxlength="20"></td>
<td width="84%"><div style="background-color:#FFdddd;width:400;line-height:23px;border-style:solid; border-width: 1pt;border-color:#ff0000">库仓还有该材料库存<b><font color=red>aa</font></b>,计划生产产品数<b><font color=red>bb</font></b></div></td>
</tr>
</table> <script language="JavaScript">
<!--
function clew()
{
document.getElementById("amount").className="a";
}
function clew1()
{
document.getElementById("amount").className="b";
}
//-->
</script></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="">
</head>
<style type="text/css">
<!--
.b{
color:red;
}
.a{
color:blue;
}--></style><body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="16%">
<input name="amount" type="text" id="amount" onFocus="clew();" onblur="clew1();" value="aaa" size="20" maxlength="20"></td>
<td width="84%"><div style="background-color:#FFdddd;width:400;line-height:23px;border-style:solid; border-width: 1pt;border-color:#ff0000">库仓还有该材料库存<b><font color=red>aa</font></b>,计划生产产品数<b><font color=red>bb</font></b></div></td>
</tr>
</table> <script language="JavaScript">
<!--
function clew()
{
document.getElementById("amount").className="a";
}
function clew1()
{
document.getElementById("amount").className="b";
}
//-->
</script></body>
</html>
<style type="text/css">
<!--
.b{
color:red;
}
.a{
color:blue;
}--></style><body>
<input name="abc" value="abc" className="b" onfocus="javascript:abc.className='a'" onblur="javascript:abc.className='b'">但是不能达到我的要求
document.getElementsByTagName("div")[0].className='a';