Show the coordinates you clickedgt; varEvent = Event | |window.event; Alert ("Coordinates: [" + Event.clientx + "," + Event.clienty + "]")The user presses the keyboard to display the KeyCodeGt;window.onload=function (){ varOP = document.getElementsByTagName ("P") [0]; Document.onkeydown=function(event) {varEvent = Event | |window.event; Op.innerhtml=Event.keycode; return false }}Simulate select control show clicked coordinates user presses the keyboard to display
Html
CopyCodeThe Code is as follows: JavascriptCopy codeThe Code is as follows: function submit1 (e ){VaR isie = (document. All )? True: false; // determines whether the kernel is IE or Mozilla.Var key;If (isie)Key = Window. event. keycode; // ie uses the windows. Event eventElse{Key = E. Which; // the three key functions have a default Hidden variable, which is passed by E. E. which provides an index value to the MO kernel (Note 1)}
If (Key = 13)Se
9Joystick2button10 Second Handle button 10Joystick2button11 Second Handle button 11Joystick2button12 Second Handle button 12Joystick2button13 Second handle button 13Joystick2button14 Second handle button 14Joystick2button15 Second Handle button 15Joystick2button16 Second Handle button 16joystick2button17 Second Handle button 17Joystick2button18 Second Handle button 18Joystick2button19 Second handle button 19Joystick3button0 Third handle button 0Joystick3button1 Third handle button 1Joystick3but
interactive means is limited can: keyboard, mouse, Of course, if there is a touch screen can be counted, and if you want to effective application, at least to know what you say, you tell it what the instructions, this requires us to understand its transmission principle and grammar more clearly, of course, we all know that the machine is reading the numbers, that is how to get it to the digital instructions it.In this way, I first write to get the keyboard
achieve the interactive means is limited to: keyboard, mouse, Of course, if there is a touch screen can be counted, and the false idea to effective application, at least to know what you say, what you tell it, this requires us to understand its transmission principle and grammar more clearly, of course, we all know that the machine is reading the numbers, then how to get it to the digital instructions it.In this way, I first write to get the keyboard KeyCod
7Joystick2button8 Second Handle button 8Joystick2button9 Second Handle button 9Joystick2button10 Second Handle button 10Joystick2button11 Second Handle button 11Joystick2button12 Second Handle button 12Joystick2button13 Second handle button 13Joystick2button14 Second handle button 14Joystick2button15 Second Handle button 15Joystick2button16 Second Handle button 16joystick2button17 Second Handle button 17Joystick2button18 Second Handle button 18Joystick2button19 Second handle button 19Joystick3b
I used to test my website in IE8. Some of the Code that was written later failed and I had to download Firefox and its plug-in Firebug to find that FF does not support windows. event. So I changed my mind. HTML
The Code is as follows:
Javascript
The Code is as follows:
Function submit1 (e ){Var isie = (document. all )? True: false; // determines whether the kernel is IE or Mozilla.Var key;If (isie)Key = window. event. keyCode; // IE use
interactive means we can achieve is really limited: the keyboard, the mouse, of course, if there is a touch screen can also be calculated, and if you want effective applications, at least you need to know what you are talking about and what commands you tell it. This requires us to have a clearer understanding of its transmission principles and syntax, of course, we all know that a machine reads numbers, so how can we get the digital commands for it.
In this way, I will first attach the write m
Recently I am writing a winformProgramThe key needs to be captured. the keycode captured with keypress in Chinese is always 229
I have checked a lot of information online and cannot solve this problem well.
Finally, I can only solve it in disguise.
Set imemode to disable unless you need to enter Chinese characters.
Use the textchanged event to process keys (cups...) Where Chinese characters are needed ...)
// Fix 229 bug
button 13Joystick2button14 Second handle button 14Joystick2button15 Second Handle button 15Joystick2button16 Second Handle button 16joystick2button17 Second Handle button 17Joystick2button18 Second Handle button 18Joystick2button19 Second handle button 19Joystick3button0 Third handle button 0Joystick3button1 Third handle button 1Joystick3button2 Third handle button 2Joystick3button3 Third handle button 3Joystick3button4 Third handle button 4Joystick3button5 Third handle Button 5Joystick3button6
HTMLCopy codeThe Code is as follows: JavascriptCopy codeThe Code is as follows:Function submit1 (e ){Var isie = (document. all )? True: false; // determines whether the kernel is IE or Mozilla.Var key;If (isie)Key = window. event. keyCode; // IE uses the windows. eventElse{Key = e. which; // the three key functions have a default Hidden variable, which is passed by e. E. which provides an index value to the Mo kernel (Note 1)}If (key = 13)Send1 ('logi
Use a timer to monitor window.innerheight height changes to determine. Trigger keyboard Other places also have event response Hide the keyboard and perform events when the phone endpoint hits the keyboard and cannot get the part of the KeyCode value
Check whether the input is a number in this article using KeyCode with the onkeypress event to implement, specific examples such as the followingThe code is as follows:
JS Instance
The code is as follows
Copy Code
Of course, we can also use jquery Event.which to get the user to press the keyboard value
GrammarEvent.which parameter DescriptionEvent required. Specify the events to check. This event parameter comes from the event-binding function.
jquery discards the standard button attribute using which, which is a bit confusing.
Which is introduced by Firefox, IE does not support. Which is meant to get the keyboard's ke
Internet Explorer listener
Code
[Ctrl + A select all Note: If you need to introduce external JS, You need to refresh it to execute]
ASCII code tableASCII 0 {nulo, SEM som}ASCII 1ASCII 2ASCII 3ASCII 4ASCII 5ASCII 6ASCII 7ASCII 8 {backspace}ASCII 9 {tab}ASCII 10ASCII 11ASCII 12ASCII 13 {enter}ASCII 14ASCII 15ASCII 16 {shift}ASCII 17 {CTRL}ASCII 18 {alt}ASCII 19ASCII 20 {capslock}ASCII 21ASCII 22ASCII 23ASCII 24ASCII 25ASCII 26ASCII 27ASCII
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.