基于jQuery的簡單九宮格實(shí)現(xiàn)代碼
更新時間:2012年08月09日 00:00:57 作者:
聽朋友說要作個九宮格,我也就隨便寫一個,等待完善
復(fù)制代碼 代碼如下:
<input type="button" value="1"/>
<input type="button" value="2"/>
<input type="button" value="3"/><br>
<input type="button" value="4"/>
<input type="button" value="5"/>
<input type="button" value="6"/><br>
<input type="button" value="7"/>
<input type="button" value="8"/>
<input type="button" value="9"/><br>
<input type="text" value=""/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
var items="";
jQuery(function(){
$("input:button").each(function(index){
$(this).mouseover(function(){
if(items.indexOf($('input').eq(index).val())==-1){
items+=$('input').eq(index).val();
$('input:text').val(items)
}
})
})
})
</script>
相關(guān)文章
基于jQuery實(shí)現(xiàn)定位導(dǎo)航位置效果
這篇文章主要為大家詳細(xì)介紹了基于jQuery實(shí)現(xiàn)定位導(dǎo)航位置效果,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-11-11jquery click([data],fn)使用方法實(shí)例介紹
大概意思就是觸發(fā)每一個匹配元素的click事件,本文通過一個實(shí)例為大家詳細(xì)介紹下jquery click([data],fn)的使用方法,感興趣的朋友可以參考下哈,希望對大家有所幫助2013-07-07使用jquery-easyui的布局layout寫后臺管理頁面的代碼詳解
這篇文章主要介紹了使用jquery-easyui的布局layout寫后臺管理頁面的代碼詳解,本文通過實(shí)例代碼給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2019-06-06jQuery實(shí)現(xiàn)購物車的總價計算和總價傳值功能
這篇文章主要介紹了jQuery實(shí)現(xiàn)購物車的總價計算和總價傳值功能 ,代碼簡單易懂,非常不錯,具有一定的參考借鑒價值,需要的朋友可以參考下2018-11-11jQuery 利用$.ajax 時獲取原生XMLHttpRequest 對象的方法
這篇文章主要介紹了jQuery 利用$.ajax 時獲取原生XMLHttpRequest 對象的方法,非常不錯,具有參考借鑒價值,需要的朋友可以參考下2016-08-08jQuery中$.ajax()和$.getJson()同步處理詳解
這篇文章主要介紹了jQuery中$.ajax()和$.getJson()同步處理詳解的相關(guān)資料,非常的細(xì)致全面,有需要的小伙伴可以參考下。2015-08-08jqGrid增加時--判斷開始日期與結(jié)束日期(實(shí)例解析)
jqGrid增加時--判斷開始日期與結(jié)束日期(實(shí)例代碼)。需要的朋友可以過來參考下,希望對大家有所幫助2013-11-11