源码网商城,靠谱的源码在线交易网站 我的订单 购物车 帮助

源码网商城

基于jQuery的简单九宫格实现代码

  • 时间:2022-05-11 17:17 编辑: 来源: 阅读:
  • 扫一扫,手机访问
摘要:基于jQuery的简单九宫格实现代码
[u]复制代码[/u] 代码如下:
<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>
  • 全部评论(0)
联系客服
客服电话:
400-000-3129
微信版

扫一扫进微信版
返回顶部