1, cannot be empty
2, you can only input English and digital
3, the judgment character consists of letters and numbers, underscores, and dots. And the beginning can only be underlined and letters./^ ([A-za-z_]{1}) ([\w]*) $/g.test (str)
4, you
JavaScript does not have any functions that print or output.In HTML, JavaScript is typically used to manipulate HTML elements.manipulating HTML elementsIf you need to access an HTML element from JavaScript, you can use the document.getElementById
Like many other object-oriented languages, JavaScript also has the This keyword, which is used in a function to point to an object that calls this method. In the actual programming to determine who this is pointing to, you can generally follow the
The great Comrade Albert Einstein said: "If you can't explain a problem to a 6-year-old, it means you're not getting it all figured out." However, when I explained to a 27-year-old friend what a closure was, it failed completely.
This was
I. About getting Event objects
FF a bit stubborn, only support arguments[0], do not support window.event. This time really do not blame ie, although the event as a window property is not standardized, but everyone has acquiesced to this small
Do not do detailed text description, direct writing code, very clear.
The above code is very prone to problems when it executes, we introduce a method, Arguments.callee, is a pointer to the function being executed, using pointers in place
Various frameworks have the ability to bind a list of data to the DOM, such as angular, which is bound with ng-repeat. So what about polymer? In fact, this level of functionality belongs to the extended function of the framework, angular ng-repeat
When it comes to generator, people are talking about asynchrony. It was obviously broken by some weird stuff. Closely related to the generator should be iterator is right, take generator to deal with Asynchrony may be some C # programmers will think.
Design ideas
The key of this method is the comprehensive application of cookie technology and dynamic image characteristics. Using cookies, you can record the user's data on the client's hard disk, and the next time you visit the site, you can read
A variable is a container for storing information:
x=5; length=66.10;
Do you remember the algebra you learned in school?
When you remember the algebra lessons you learned in school, it's possible to think of the following: X=5, y=6,
To get Unicode encoding for a character, you can use the String.charcodeat (index) method, which is defined as:
Strobj.charcodeat (Index)
Index is the position of the specified character in the Strobj object (based on a 0 index), and
There are several ways to create a string. The simplest is to enclose a set of characters in quotation marks and assign them to a string variable.
var mystr = "Hello, string!";
You can enclose a string in double or single quotes,
The scope of JavaScript is bounded by functions, and different functions have relatively independent scopes. You can declare and access global variables within a function, or you can declare local variables (using the var keyword, the function's
Brief introduction
JSON, the JavaScript Object natation, is a lightweight data interchange format that is ideal for server interaction with JavaScript.JSON is a data interchange format that, like XML and Yaml, is a way to deliver structured
This example describes how JavaScript handles the default event for a label hyperlink. Share to everyone for your reference. The specific analysis is as follows:
Sometimes you need to add the Click event on a tab and handle some transactions before
A document that describes the current window or the specified Window object. It contains the contents of the document from to .
Usage: Document (current window) or .document (Specify window)
Property:
Document.title//Set document title equivalent
The screens Screen object reflects the screen settings for the current user.Width returns the size of the screen (the number of pixels).Height returns to the screen heights.Availwidth returns the available width of the screen (excluding the width of
From the beginning of contact with JS this thing has a year, heart is always some can not speak out of the anguish. It is often said in forums. So where is the bitter? Always feel that learning is not in-depth, some simple things can be done but
Object.valueof ()
The required object parameter is any intrinsic JScript object.
Description
The valueof method definitions for each of the JScript intrinsic objects are different.
Object
return value
Array
The
Today learning JS Harvest and Small Summary:
When does the script execute:
1. Execute script when opening page
When a browser opens an HTML document, it interprets the entire document from the beginning, including HTML tags and scripts. If
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service