首页 >

jQuery实现ctrl+enter(回车)提交表单【jquery】

web前端|js教程jQuery实现ctrl+enter(回车)提交表单【jquery】
jquery回车提交表单,jquery,ctrl,enter
web前端-js教程
以jQuery插件开发的方法开发。具体代码如下:
含积分兑换的博客网站源码,vscode颜色选取插件,ubuntu 软件配置,tomcat 不用了,sqlite3怎么打开,极乐迪斯科古老的爬虫脑对话,php 商品筛选,宁夏seo推广商家,球球大作战刷棒棒糖网站源码,网页生成微信支付二维码源码,西部数码 模板lzw
jQuery.fn.extend({  /**   * ctrl+enter提交表单   * @param {Function} fn 操作后执行的函数   * @param {Object} thisObj 指针作用域   */  ctrlSubmit:function(fn,thisObj){    var obj = thisObj || this;    var stat = false;    return this.each(function(){      $(this).keyup(function(event){        //只按下ctrl情况,等待enter键的按下        if(event.keyCode == 17){          stat = true;          //取消等待          setTimeout(function(){            stat = false;          },300);        }         if(event.keyCode == 13 && (stat || event.ctrlKey)){          fn.call(obj,event);        }       });    });  } });
使用方法:
卡密充值平台源码,ubuntu怎么建立文件,爬虫删除知乎,磁力php,seo全套优化lzw
$("#textarea").ctrlSubmit(function(event){  //提交代码写在这里});
是不是非常的简单实用呢,希望大家能够喜欢。
源码论坛是什么,ubuntu怎么写命令,爬虫 图集 所有图片,php vps,seo518lzw

jQuery实现ctrl+enter(回车)提交表单【jquery】
  • 使用JQuery实现Ctrl+Enter提交表单办法【jquery】
  • 使用JQuery实现Ctrl+Enter提交表单办法【jquery】 | 使用JQuery实现Ctrl+Enter提交表单办法【jquery】 ...