1 varnum =1;2 3 varstr ='1';4 5 varTest =1;6 7Test = = num//true same type same value8 9Test = = num//true same type same valueTen OneTest!== num//false test is the same as NUM type, its value is the same, non-operation is definitely false A
User registration information is verified correctlyOne, JavaScript waySecond, regular expression validationApply Regular expression validation: User name 4-16 bit, beginning of letter ; username 4-16 bit, first letter capitalized ; two times the
bad wording. function createperson(name,qq) {//Constructors /* The new constructor will automatically be the new Object object, var this = new object (); Finally, the new this object is returned, return this; */ This. name=name;//Property
Now there is a id=test drop-down box, how to get the selected value?Using JavaScript native methods and jquery methods, respectivelytext1text2CodeOne: JavaScript native method1: Get the Select object: Var myselect=document.getelementbyid ("Test");2:
In most cases, false is returned for the event handler to prevent the default event behavior. For example, by clicking on a element by default, the page jumps to the page specified by the href attribute of the element.Return False equals the
Use single quotation marks for strings.Goodvar name = ' Terence ';//badvar name = "Terence";Strings longer than 80 characters should be wrapped using a string connector.Goodvar msg = ' Test Information testing information Test information Test
Js program is encoded using Unicode character set;
JS language is strictly case sensitive (variables, functions, keywords, identifiers)
The JS language ignores whitespace wrapping tabs.
JS statement to ; (semicolon) at the end, but if
Instance 009 when closing IE main window, do not pop up the inquiry dialog box Instance descriptionNormally, when we use Window.close () to close the IE window, we pop up a check box to turn it off, and we'll block it out. Technical Essentialsin
The scope of a variableTo understand closures, you must first understand the special variable scope of JavaScript.The scope of a variable is nothing more than two kinds: global variables and local variables.The special point of the JavaScript
Object-oriented approach to encapsulate JavaScript, JavaScript is not the concept of class.So the encapsulation that we talked about today is actually implemented using JavaScript functions.
1234
var people{ name: ' A commoner ',
Understanding mandatory Package Three basic facts1. JS allows you to reference variables defined outside of the current function.Exfunction Makesandwich () {var magicingredient = "Peanut butter";function make (filling) { return magicingredient + '
Examples of For In statement usage In Javascript
This example describes the usage of the For In statement In Javascript. Share it with you for your reference. The details are as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Examples of javascript function features
This article analyzes the features of javascript Functions. Share it with you for your reference. The specific analysis is as follows:
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
AngularJS built-in filter details
In our development, the information displayed on the page must be formatted to be displayed to the user. In angularjs, the filter command is provided for us, allowing us to easily implement some column functions.
How to dynamically change the layer size using javascript
This example describes how to dynamically change the layer size in javascript. Share it with you for your reference. The specific implementation method is as follows:
?
1 2 3 4 5
JQuery's method of continuously blinking text
This article mainly introduces jQuery's method of implementing flickering text, involving the fadeOut and fadeIn methods and recursive calling techniques in jQuery. For more information, see
This
Javascript allows you to select, reverse select, and delete tables.
This example describes how to select, reverse select, and delete a table in javascript. Share it with you for your reference. The specific implementation method is as follows:
?
Javascript controls the closure and expansion of the list through overflow
This article describes how Javascript controls the closure and expansion of the list through overflow. Share it with you for your reference. The specific implementation
Method for js to implement slow div layer contraction and expansion
This article describes how to implement slow div layer contraction and expansion in JavaScript. Share it with you for your reference. The specific analysis is as follows:
This is a
An Efficient Method for Adaptive Layout on mobile terminals. You are welcome to criticize or correct the layout.
It is a method that I personally prefer. The advantage is that it can save a lot of adaptation time and effort,
I. The general approach
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.