试试
<script language="javasxcript">
function changecolor()
{
document.all.inputname.style="background:red"
}
</script>
<script language="javasxcript">
function changecolor()
{
document.all.inputname.style="background:red"
}
</script>
解决方案 »
- js怎么取它的index啊??【简单问题,纯属送分,不懂】
- 用 myClassName.prototype 设计的类成员函数,里面如果要为TR对象添加一个onmouseover事件处理程序,要怎么做?
- 层移动到窗体底部导致内容向下滚动后,鼠标与层脱离的问题求助
- 【【【【【【【下班前,加急问,js语法小问题】】】】】】】
- 当mouse经过td时,如何改变td中文字的颜色?
- function可以这么写吗,可否解释一下?
- 能不能停止javascript程序5秒,5秒后执行没有执行完的程序。请教如下:
- 急:怎样在客户端控制扫描仪?
- 如何学jsp???
- 请大家帮忙,在框架网页中刷新网页?
- 怎么验证文框中输入时间(带分秒)的合法性,格式如2002-7-26 11:03:00
- 如何把网页的内容(或网页中的部份内空)转换成其它格式---Txt, DBF XLS XML
function changecolor()
{
document.all.textdata_A[].style="background:red" ;
document.all.textdata_B[].style="background:red" ;
document.all.textdata_C[].style="background:red" ;
document.all.textdata_D[].style="background:red" ;
}
</script><?php
do{ echo "<tr height=40 bgcolor=#cccccc >" ;
echo "<td >".$row['VT4_0']."<font color=#FF0000>".$row['VT4_1']."</font></td>";
echo "<td ><input name=textdata_A[] type=text onClick=changecolor()></td>";
echo "<td ><input name=textdata_B[] type=text onClick=changecolor()></td>";
echo "<td ><input name=textdata_C[] type=text onClick=changecolor()></td>";
echo "<td ><input name=textdata_D[] type=text onClick=changecolor()></td>";
echo "</tr>";
} while ($row= mssql_fetch_assoc($query)); ?>
感谢 zltostem(尘寞)给予的帮助.<input name="textdataA" type=text onfocusout="this.style.background='#ffffff'" onfocusin="this.style.background='#cccccc'">
<input name="textdataB" type=text onfocusout="this.style.background='#ffffff'" onfocusin="this.style.background='#cccccc'">
<input name="textdataC" type=text onfocusout="this.style.background='#ffffff'" onfocusin="this.style.background='#cccccc'">
<input name="textdataD" type=text onfocusout="this.style.background='#ffffff'" onfocusin="this.style.background='#cccccc'">