JQuery implements page flip by keyboard arrow keys
This article will share with you the special effect of using jQuery to press the arrow key of the keyboard to flip pages. The code is very simple and the function is very practical. We recommend it to you and hope you will like it.
1. jQuery code:
The Code is as follows:
$ (Document). ready (function ()
= ediaeresis Ediaeresiskeycode 248 = idiaeresis Idiaeresiskeycode 249 = odiaeresis Odiaeresiskeycode = udiaeresis Udiaeresiskeycode 251 = ssharp question Backslashkeycode 252 = Asciicircum Degreekeyco De 253 = 3 Sterlingkeycode 254 = Mode_switch Use the KeyCode property of the event object to determine the input key value Eg:if (event.keycode==13) {var iekey=event.keycode ;//Get key value, digital form ofvar realkey=string.fromcharcode (Iekey)//Converts the key value in digital form to the real
= odiaeresis Odiaeresiskeycode = udiaeresis Udiaeresiskeycode 251 = Ssharp ques tion Backslashkeycode 252 = asciicircum Degreekeycode 253 = 3 Sterlingkeycode 254 = Mode_switch Use the KeyCode property of the event object to determine the input key value E G:if (event.keycode==13) {var iekey=event.keycode;//gets the key value, the digital form of thevar realkey=string.fromcharcode (Iekey)//Converts the key value in digital form to the real key alert (Realkey);} Key value corresponds to table a 0
Js enables the keyboard to press the left and right keys to select text and display it in the text box
This example describes how to enable Javascript to enable the keyboard to select text and display it in the text box. Share it with you for your reference. The specific implementation method is as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Javascript captures keys pressed on the keyboard.
A small demo uses js to capture the key on the keyboard and then display the corresponding code value.
The above is all the content of this article. I hope you will like it.
Keyboard keys
$ (document). Ready (function () {
$ (document). Bind ("ContextMenu", function (e) {
return false;
});
});
A little different.
$ (' body '). Bind ("Selectstart", function () {return false;});
You can use it if you want to ban copying in Firfox.
Body
{
-moz-user-focus:ignore;
-moz-user-select:none;
}
To define the
The following are some of the
You can use the upper and lower keys on the keyboard to select the implementation code of table rows. The idea is good. For more information, see.
// This is the table to be operated on: [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
Preface: Before the understanding of the introduction of a foreign cool website, one of the sensitive website with the simultaneous holding "Q, A, p, l" to watch the video let go immediately force stop (manual squint). The actual use of this feature, I think it is possible to do some small system permissions control can be used, so as to eliminate the login and permissions-related functions.Example 1: Increase permissions while holding "~, L, J, W," at the same time1.1 JS section:Key permissions
The two sections use the upper and lower keys of the keyboard to select code:Section 1 [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]Section 2 [Ctrl + A select all Note: If you need to introduce external Js, You need to refresh it to execute]
First, you need to determine whether you want to disable the global control or the specified control. For example, I only need to disable the up and down keys of a text box.Copy codeThe Code is as follows:NoExec = function (event ){Var k = event. which | event. keyCode;If (k = 13 | k = 38 | k = 40 ){If ($ ("# atWinByArea"). attr ("id ")){If (event. which) {// FirefoxEvent. preventDefault ();} Else {// IE, ChromeEvent. returnValue = false;}}}DownAt (ev
2 Keys Keyboard "programming question", keyskeyboardDescription
Solutions
I don't have to mention the question. As for the solution, I want to think about the dynamic planning of the past, but I think about it and it will be biased by a cute ting. But in the end, I still have a different path, this question is solved by studying the numbers themselves. The general idea is as follows:For n characters A, if y
Every day, a JS demo uses the keyboard arrow keys to seamlessly switch between top, bottom, and left. Key knowledge points: events, jsdemo
// Animation format FormulaVar Tween = {Linear: function (t, B, c, d ){Return c * t/d + B;},EaseIn: function (t, B, c, d ){Return c * (t/= d) * t + B;},EaseOut: function (t, B, c, d ){Return-c * (t/= d) * (t-2) + B;},EaseBoth: function (t, B, c, d ){If (t/= d/2) Return
Constants of some special keys on the keyboard in SWT:
Enter: the value of the SWT. Cr int type is 13.Line feed key: SWT. Lf
ESC key: SWT. ESC int type value: 27
Backspace key: the value of the SWT. BS int type is 8.
Del key: SWT. DEL
Tab key: SWT. Tab
Shift key: SWT. Shift
CTRL: SWT. CTRL or SWT. Control
Alt key: the value of SWT. Alt int type is 65536
Up arrow key: SWT. arrow_upDownward direction
Basic knowledge about Mac OS X! -- New users must read
Address: http://bbs.weiphone.com/read-htm-tid-297365.html
1. Each Mac OS key corresponds to a key under the win keyboard!Win key = opShift Key = ShiftAlt key = command (that is, spline)Ctrl key = CTRL2. Related shortcut keys
2.1 common 2.2expos space and dashboard 2.3 Basic 2.4 F 2.5 finder 2.6 spotight 2.7 screens 2
consecutivelyDD-delete a whole line ndd-delete the down n rows of the cursorD1G-delete the line from the cursor to the first line DG-delete the line from the cursor to the last rowd$-delete cursor at end of line D0-delete cursor at beginning of rowYY-the line where the copy cursor is NYY-the next n line where the copy cursor is locatedY1G-Copy the current line to the first line YG-Copy the current line to the last rowY0-Copy current cursor to beginning y$-copy current cursor to end of lineP-pas
document.onkeydown=function(){Alert (Event.keycode)//You can view the individual keysKeyCodeis how much if (Event.keycode = = //esc { event.keycode = 0; returnfalse; }JS shielded keyboard keys
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.