基于jQuery的簡單九宮格實現(xiàn)代碼
更新時間:2012年08月09日 00:00:57 作者:
聽朋友說要作個九宮格,我也就隨便寫一個,等待完善
復制代碼 代碼如下:
<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>
相關文章
JQueryiframe頁面操作父頁面中的元素與方法(實例講解)
這篇文章主要是對JQueryiframe頁面操作父頁面中的元素與方法進行了詳細的分析介紹,需要的朋友可以過來參考下,希望對大家有所幫助2013-11-11
用戶管理的設計_jquery的ajax實現(xiàn)二級聯(lián)動效果
下面小編就為大家?guī)硪黄脩艄芾淼脑O計_jquery的ajax實現(xiàn)二級聯(lián)動效果。小編覺得挺不錯的,現(xiàn)在就分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-07-07
基于jquery實現(xiàn)可定制的web在線富文本編輯器附源碼下載
UEditor的功能非常強大,官方已配備了php,asp,asp.net,java等語言的上傳程序,拿來就可以使用,當然ueditor更具有功能插件接口,很輕松地添加自己定義功能到編輯器中,方便項目的不同需求2015-11-11
jQuery 實現(xiàn)自動填充郵箱功能(帶下拉提示)
本文用 jQuery 實現(xiàn)一個用戶輸入字符時出現(xiàn)能夠提示郵箱后綴名的下拉菜單,并且在選擇下拉菜單中的郵箱后綴名后可自動填充未完成的輸入框。2014-10-10
Hallo.js基于jQuery UI所見即所得的Web編輯器
Hallo.js是一個簡單的富文本編輯器,基于jQuery UI的部件,利用HTML5的contentEditable功能實現(xiàn)了即時編輯功能,其主要目的是為了提供良好的書寫體驗,對Hallo.js感興趣的小伙伴們可以參考一下2016-01-01

