Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sunac-quanmin
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HTML5-李恒逸
sunac-quanmin
Commits
27ce5ed8
Commit
27ce5ed8
authored
Jun 15, 2017
by
HTML5-侯张振
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 火狐浏览 enter不能登录
parent
ffabb5d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
5 deletions
+30
-5
login.php
html/application/views/admin/login.php
+30
-5
No files found.
html/application/views/admin/login.php
View file @
27ce5ed8
...
...
@@ -116,11 +116,26 @@
// $("#password").val($.cookie("password"));
}
});
function
EnterPress
(
e
){
//传入 event
var
e
=
e
||
window
.
event
;
if
(
event
.
keyCode
==
13
){
$
(
'.login-btn'
).
trigger
(
'click'
);
}
function
EnterPress
(
e
){
//传入 event
// var e = e || window.event;
// if(event.keyCode == 13){
// $('.login-btn').trigger('click');
// }
var
keycode
=
0
;
//IE浏览器
if
(
CheckBrowserIsIE
()){
keycode
=
e
.
keyCode
;
}
else
{
//火狐浏览器
keycode
=
e
.
which
;
}
if
(
keycode
==
13
)
//回车键是13
{
$
(
'.login-btn'
).
trigger
(
'click'
);
}
}
$
(
".login-btn"
).
click
(
function
(){
var
username
=
$
(
"#username"
).
val
();
...
...
@@ -186,6 +201,16 @@
// $.cookie("password", '', { expires: -1 });
}
}
//判断访问者的浏览器是否是IE
function
CheckBrowserIsIE
(){
var
result
=
false
;
var
browser
=
navigator
.
appName
;
if
(
browser
==
"Microsoft Internet Explorer"
){
result
=
true
;
}
return
result
;
}
</script>
<!-- END JAVASCRIPTS -->
</body>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment