来讨论阿,可能和样式表单有关得常见疑难 将ID取为相同名字,用<script language="Javascript" for=id1>来实现相同操作的功能 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script for=pr event=onmouseover> thisobj=window.event.srcElement; thisobj.style.color="red";</script><script for=pr event=onmouseout> thisobj=window.event.srcElement; thisobj.style.color="";</script><input type=button id=pr value="Button1"><input type=button id=pr value="Button2"><input type=button id=pr value="Button3"> 以下是通用的办法:<style>.navover{background-color:red}.navout{background-color:green}.navdown{background-color:blue}.navup{background-color:gray}td{background-color:#0099FF}</style><script>function onMouse(){var eType=event.type.toLowerCase()if(event.srcElement.tagName=="TD"){switch(eType){case "mouseover":event.srcElement.className="navover"break;case "mouseout":event.srcElement.className="navout"break;case "mousedown":event.srcElement.className="navdown"break;case "mouseup":event.srcElement.className="navup"break;}}}document.onmouseover=document.onmouseout=document.onmousedown=document.onmouseup=onMouse;</script><table width="50%"><tr><td>这是第一行</td></tr><tr><td>这是第二行</td></tr><tr><td>这是第三行</td></tr></table> Jquery的小问题 这个应该如何理解 start = start || 0; 怎么解释!!! 如何在 FireFox 下做"设为首页"."弹出浏览器窗口"的功能? 请问这代码哪里错误了? 【求助】js动态添加行后传值问题 基础的页面问题:框架如何回复到无框架状态? 刚接触javascript,几个小问题,大家帮帮忙 showModalDialog()中提交表单中遇到的问题 向高手请教鼠标的问题 javascript的函数问题 一个对我很难的,对你很容易的问题
thisobj=window.event.srcElement;
thisobj.style.color="red";
</script><script for=pr event=onmouseout>
thisobj=window.event.srcElement;
thisobj.style.color="";
</script><input type=button id=pr value="Button1">
<input type=button id=pr value="Button2">
<input type=button id=pr value="Button3">
<style>
.navover{background-color:red}
.navout{background-color:green}
.navdown{background-color:blue}
.navup{background-color:gray}
td{background-color:#0099FF}
</style>
<script>
function onMouse()
{
var eType=event.type.toLowerCase()
if(event.srcElement.tagName=="TD"){
switch(eType)
{
case "mouseover":
event.srcElement.className="navover"
break;
case "mouseout":
event.srcElement.className="navout"
break;
case "mousedown":
event.srcElement.className="navdown"
break;
case "mouseup":
event.srcElement.className="navup"
break;
}
}
}
document.onmouseover=document.onmouseout=document.onmousedown=document.onmouseup=onMouse;
</script>
<table width="50%">
<tr>
<td>这是第一行</td>
</tr>
<tr>
<td>这是第二行</td>
</tr>
<tr>
<td>这是第三行</td>
</tr>
</table>