Home > Web Front-end > JS Tutorial > javascript demo basic skills_javascript skills

javascript demo basic skills_javascript skills

WBOY
Release: 2016-05-16 18:38:46
Original
1037 people have browsed it
1.javascript gets the parameters after the URL "?":

var query = window.location.search.substring(1);
var pairs = query.split("& ");

2. The default function of IE browser stops
(the movement of the Tab key in the address bar, etc. stops)
Copy code The code is as follows:

function stopDefaultKey(){
window.event.cancelBubble = true; //---Cancel the The bubbling of events.
window.event.returnValue = false; //The event returns a false value.
return false ;
}

3.javascript static variable, declared once in the same js file, available in multiple places
this.Variable name

4.javascript keyCode

event.keyCode == 13 enter
event.keyCode == 9 tab
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template