手机
当前位置:查字典教程网 >编程开发 >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的基本概念与高级编程

基于JavaScript实现智能右键菜单

JavaScript实现身份证验证代码

基于jQuery实现的无刷新表格分页实例

jquery合并表格中相同文本的相邻单元格

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

jQuery+ajax实现无刷新级联菜单示例

Javascript 字符串模板的简单实现

一个很简单的办法实现TD的加亮效果.

基于Web标准的UI组件 — 树状菜单(2)

精品推荐
分类导航