JS tips~ 备用

还是老话,不要直接在html中写js代码

修改input,onclick事件,点击后,submit变灰

<form action="http://www.baidu.com" method="POST">
<input name="T1" size="20" type="text" />
<input onclick="javascript:{this.disabled=true;document.form1.submit();}" type="button" value="提交" />
<input name="B2" type="reset" value="重置" />
</form>

鼠标划过,变色!

<table border="1" width="200">
<tbody>
<tr onmouseover="this.bgColor='#666666'" onmouseout="this.bgColor='#FFFFFF'">
<td>1</td>
</tr>
<tr onmouseover="this.bgColor='#666666'" onmouseout="this.bgColor='#FFFFFF'">
<td>2</td>
</tr>
</tbody>
</table>

鼠标选定后改变input的value值

<input id="q" type="text" value="Search" style="color:#ccc" 
onblur="if(this.value=='') {this.value='Search';this.style.color='#ccc';}" 
onfocus="if(this.value=='Search') {this.value='';}this.style.color='#333';" />
posted on 2011-09-05 05:41  之乎者也2011 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/wrmfw/archive/2011/09/05/2166950.html

.bf_tips { position:absolute; display:none; min-width:100px;max-width:212px; z-index:0; overflow:hidden; white-space:normal; word-wrap:break-word; } .bf_tips > .head{ height:7px; background:url(../images/tips/tips_bg.png) left top no-repeat;} .bf_tips > .head.left{width:45px;position:absolute;left:0px;} .bf_tips > .head.right{width:45px;background-position: right -7px;overflow:hidden;position:absolute;right:0px;} .bf_tips > .head.middle{background:url(../images/tips/bf_tips_m.png) 0 -7px;overflow:hidden;margin-left:45px; margin-right:45px;} .bf_tips > .mid, .bf_tips_container{background: url(../images/tips/tips_bg_lr.png) left top repeat-y;} .bf_tips > .mid{padding-left:13px;} .bf_tips_container {background-position:right top; padding-right:15px;} .bf_tips_content {background:#f6f6f6;} .bf_tips > .foot{height:15px; background:url(../images/tips/tips_bg.png) left -14px no-repeat;} .bf_tips > .foot.left {width:45px;position:absolute;left:0px;} .bf_tips > .foot.right{width:45px;background-position:right -29px;overflow:hidden;position:absolute;right:0px;} .bf_tips > .foot.middle{background:url(../images/tips/bf_tips_m.png) 0 -21px;overflow:hidden;margin-left:45px; margin-right:45px;} /*[direction: arrowtop]*/ .bf_tips.arrowtop > .head.left {height:13px; background-position:left -44px;} .bf_tips.arrowtop > .head.right{height:13px; background-position:right -57px;} .bf_tips.arrowtop > .head.middle{height: 13px; background-position:right -47px; background-repeat:repeat-x;} .bf_tips.arrowtop > .foot.left {height: 9px; background-position:left -70px;} .bf_tips.arrowtop > .foot.right{height: 9px; background-position:right -79px;} .bf_tips.arrowtop > .foot.middle {height: 9px; background-position:left -79px; background-repeat:repeat-x;} /*[tips width validation error]*/ .bf_tips_error { padding: 0px 0px 5px 20px; background: url(../images/svg/information.svg) no-repeat; color: #cc0000; }
11-09
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值