作者grence (多想两分钟 = =")
看板Ajax
标题Re: [问题] 表格背景颜色变化
时间Mon Jul 2 12:07:48 2007
※ 引述《yo0401 (羽无伦)》之铭言:
: 我用
: <table border=1 OnClick=this.style.backgroundColor='#993366'
: OnMouseOut=this.style.backgroundColor='white'>
: 让表格能够在点选的时候变颜色
: 可是我想让点第一下的时候变色,点第二下的时候变回原来的颜色
: 应该怎麽改呢
: 我上面的那个是点了以後,变色,离开之後变回来,但我想要的是「再点一次」的时候
: 变回来,拜托大家罗~~
简单的范例…IE6能动(这个小东西应该不会有浏览器不能动吧 囧>)
<a style="display:inline"
OnClick="
(this.style.backgroundColor=(this.style.backgroundColor=='#993366') ?'white'
:'#993366')">
aaa</a>
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 210.61.172.157