手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >基于jQuery的简单九宫格实现代码
基于jQuery的简单九宫格实现代码
摘要:复制代码代码如下:varitems="";jQuery(function(){$("input:button").each(function...

复制代码 代码如下:

<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>

【基于jQuery的简单九宫格实现代码】相关文章:

jQuery实现dialog设置focus焦点的方法

jQuery插件实现适用于移动端的地址选择器

JQuery中上下文选择器实现方法

Javascript 字符串模板的简单实现

jQuery插件bgStretcher.js实现全屏背景特效

基于JavaScript实现动态添加删除表格的行

基于jquery实现下拉框美化特效

jQuery插件zepto.js简单实现tab切换

Nodejs中session的简单使用及通过session实现身份验证的方法

jquery中map函数遍历数组用法实例

精品推荐
分类导航