<!DOCTYPE html>
<html>
<head>
<title>登陆系统</title>
<link href="/nmm/Public/User/css/user.css" rel="stylesheet">
<link href="/nmm/Public/css/bootstrap.min.css" rel="stylesheet">
<script type="text/javascript" src="/nmm/Public/js/jquery.min.js"></script>
<script type="text/javascript" src="/nmm/Public/User/js/user.js"></script>
<script type="text/javascript">
if (top.window !== window) {
top.location = window.location;
} //执行键盘按键命令
function keyDown(e) {
var keycode = 0;
//IE浏览器
if (CheckBrowserIsIE()) {
keycode = event.keyCode;
} else {
//火狐浏览器
keycode = e.which;
}
if (keycode == 13) //回车键是13
{
$("#btn-save").click();
}
}
//判断访问者的浏览器是否是IE
function CheckBrowserIsIE() {
var result = false;
var browser = navigator.appName;
if (browser == "Microsoft Internet Explorer") {
result = true;
}
return result;
}
</script>
</head> <body class="login" onkeydown="keyDown(event);">
<form name="forms">
<div class="login_m">
<div class="login_logo">
<h1>NMM 信息发布系统</h1>
</div>
<div class="login_boder">
Type :quit<Enter> to exit Vim 47,4-25 29%
<button type="button" id="btn-save" class="btn btn-primary"
onclick="return check();">登陆</button>
</p>
</div>
</div>
</div>
<div class="text-center"> </div>
</form> <!-- Modal -->
<div class="modal fade" id="msgModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>
</button>
<h4 class="modal-title" id="msgModalLabel"></h4>
</div>
<div class="modal-body text-center" id="msgModalBody"></div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
</div>
</div>
</div>
</div>
</body>
</html>

js监听键盘提交表单的更多相关文章

  1. js模拟支付宝提交表单

    弄过支付宝的程序猿可能都知道,里面有非常多地方都用到了自提交表单的方式,支付宝的接口通过请求API的形式取得server返回的表单字符串,使用out.print("表单字符串")在 ...

  2. js无刷新提交表单

    $("#form1").attr("target", "frameFile"); $("#form1").submit( ...

  3. [JS] 页面回车键提交表单-常用于登录页面

    //判断是否按下了回车键 var EnterSubmit = function(evt){ evt= window.event || evt; if (evt.keyCode == 13){ //若按 ...

  4. js 防止重复提交表单

    var addFlag = true; function addQuestion(){ if(!addFlag){ return; } addFlag = false; //执行更新操作 jQuery ...

  5. js模拟post提交表单

    function post(URL, PARAMS) {            var temp = document.createElement("form");         ...

  6. JS post提交表单

    js post方式提交表单有两种办法,1:AJAX提交 2:在JS里拼出一个form,然后submit 第二种办法的代码 //这个主要是解决给password MD5 var email = 'ema ...

  7. js监听键盘触发按钮事件,回车提交表单

    /*回车提交表单*/ $(document).keydown(function(event){ if(event.keyCode == 13){ //alert('你按下了Enter'); $(&qu ...

  8. 工作中碰到的js问题(disabled表单元素不能提交到服务器)

    今天碰到一个奇葩的问题,asp页面表单提交后,有一个文本框<input type="text" name="phone" id="phone&q ...

  9. js实现无刷新表单提交文件,将ajax请求转换为form请求方法

    最近在做项目的时候遇到一个需要上传文件的需求,因为ajax请求是无法上传二进制文件流的,所以只能用form表单提交,而form提交有一个问题就是会使页面刷新,本文解决了form表单提交文件时页面刷新的 ...

随机推荐

  1. 指定查询条件,查询对应的集合List(单表)

    TestDao.java(测试类) @Test public void findCollectionByConditionNoPage(){  ApplicationContext ac = new ...

  2. 关于mybatis的学习笔记

    配置文件 贴出mybatis的配置文件,这里mybatis还未与spring做整合: <?xml version="1.0" encoding="UTF-8&quo ...

  3. 青岛理工交流赛 H题 素数间隙

    13110581088注销 素数间隙 Time Limit: 1000MS Memory limit: 262144K 题目描述 Neko猫是一个很喜欢玩数字游戏的会说话的肥猫,经常会想到很多很好玩的 ...

  4. UVA10689 Yet another Number Sequence —— 斐波那契、矩阵快速幂

    题目链接:https://vjudge.net/problem/UVA-10689 题解: 代码如下: #include <iostream> #include <cstdio> ...

  5. LightOJ1341 Aladdin and the Flying Carpet —— 唯一分解定理

    题目链接:https://vjudge.net/problem/LightOJ-1341 1341 - Aladdin and the Flying Carpet    PDF (English) S ...

  6. 浏览器端JS导出EXCEL

    浏览器端JS导出EXCEL FileSaver.js 实现了在本身不支持 HTML5 W3C saveAs() FileSaver 接口的浏览器支持文件保存.FileSaver.js 在客户端保存文件 ...

  7. SPOJ Find the max XOR value(二进制,贪心即可)

    You have two integers L and R, and you are required to find the max xor value of a and b where L < ...

  8. poj3417 Network——LCA+树上差分

    题目:http://poj.org/problem?id=3417 根据一条边被几个环覆盖来判断能不能删.有几种情况等: 用树上差分,终点 s++,LCA s-=2,统计时计算子树s值的和即可: 用S ...

  9. POJ3211(trie+01背包)

    Washing Clothes Time Limit: 1000MS   Memory Limit: 131072K Total Submissions: 9384   Accepted: 2997 ...

  10. 创建calico网络报错client response is invalid json

    使用docker创建calico网络失败. # docker network create --driver calico --ipam-driver calico-ipam testcalico E ...