Jquery實(shí)現(xiàn)的一種常用高亮效果示例代碼
如下所示:
<html>
<head>
<title>jquery</title>
<style>
body
{
font-size: 12px;
}
li
{
list-style: none;
height: 34px;
padding-top: 5px;
}
</style>
<script type="text/javascript" src="jquery-1.2.6.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var oInputs = $("ul.demo input");
oInputs.each(function(i){
oInputs.eq(i).focus(function(){
oInputs.eq(i).parent().css("background-color","ccf");
}).blur(function(){
oInputs.parent().css("background-color","");
})
});
oInputs.focus(function(){
$(this).css("background-color","ff9").blur(function(){
$(this).css("background-color","");
});
})
})
</script>
</head>
<body>
<ul class="demo">
<li>
<h5>
注冊(cè)選項(xiàng)</h5>
</li>
<li>用戶名:<input type="text" value="" id="name" style="width: 200px" /></li>
<li>密 碼:<input type="password" value="" id="pass" style="width: 200px" /></li>
<li>愛(ài) 好:<input type="checkbox" value="" />籃球 <input type="checkbox" value="" />足球 <input
type="checkbox" value="" />音樂(lè)</li>
</ul>
</script>
</body>
</html>
- jQuery過(guò)濾HTML標(biāo)簽并高亮顯示關(guān)鍵字的方法
- Jquery簡(jiǎn)單實(shí)現(xiàn)GridView行高亮的方法
- jquery實(shí)現(xiàn)頁(yè)面關(guān)鍵詞高亮顯示的方法
- jQuery實(shí)現(xiàn)當(dāng)前頁(yè)面標(biāo)簽高亮顯示的方法
- jQuery實(shí)現(xiàn)高亮顯示的方法
- Jquery 點(diǎn)擊按鈕自動(dòng)高亮實(shí)現(xiàn)原理及代碼
- Jquery如何實(shí)現(xiàn)點(diǎn)擊時(shí)高亮顯示代碼
- jquery實(shí)現(xiàn)帶復(fù)選框的表格行選中刪除時(shí)高亮顯示
- jQuery實(shí)現(xiàn)鼠標(biāo)滑過(guò)遮罩并高亮顯示效果
- jQuery實(shí)現(xiàn)高亮顯示網(wǎng)頁(yè)關(guān)鍵詞的方法
相關(guān)文章
jQuery源碼分析-03構(gòu)造jQuery對(duì)象-工具函數(shù)
jQuery源碼分析-03構(gòu)造jQuery對(duì)象-工具函數(shù),需要的朋友可以參考下。2011-11-11jcarousellite.js 基于Jquery的圖片無(wú)縫滾動(dòng)插件
基于Jquery的圖片無(wú)縫滾動(dòng)插件,需要的朋友可以參考下。2010-12-12jQuery動(dòng)畫(huà)_動(dòng)力節(jié)點(diǎn)節(jié)點(diǎn)Java學(xué)院整理
用JavaScript手動(dòng)實(shí)現(xiàn)動(dòng)畫(huà)效果,需要編寫(xiě)非常復(fù)雜的代碼。下面給分享jQuery內(nèi)置的幾種動(dòng)畫(huà)樣式,需要的朋友參考下吧2017-07-07jQuery移動(dòng)端跑馬燈抽獎(jiǎng)特效升級(jí)版(抽獎(jiǎng)概率固定)實(shí)現(xiàn)方法
這篇文章主要介紹了jQuery移動(dòng)端跑馬燈抽獎(jiǎng)特效升級(jí)版(抽獎(jiǎng)概率固定)實(shí)現(xiàn)方法,涉及jQuery數(shù)值運(yùn)算及條件判斷等相關(guān)操作技巧,需要的朋友可以參考下2019-01-01jquery中使用ajax獲取遠(yuǎn)程頁(yè)面信息
當(dāng)我們點(diǎn)擊表格里面的標(biāo)題顯示相關(guān)的詳細(xì)信息,比如點(diǎn)擊新聞標(biāo)題顯示正文,而正文通常是在一個(gè)頁(yè)面里面,通過(guò)獲取傳遞的參數(shù)id查詢數(shù)據(jù)庫(kù),然后顯示出來(lái)2011-11-11jQuery實(shí)現(xiàn)動(dòng)態(tài)控制頁(yè)面元素的方法分析
這篇文章主要介紹了jQuery實(shí)現(xiàn)動(dòng)態(tài)控制頁(yè)面元素的方法,結(jié)合實(shí)例形式分析了jQuery事件響應(yīng)及頁(yè)面元素動(dòng)態(tài)操作相關(guān)實(shí)現(xiàn)技巧,需要的朋友可以參考下2017-12-12