Method one, the definition and initialization of JS array
Defining a one-dimensional array
Method 1:
var _thearray = new Array);//define
_thearray[0]= "1";
_thearray[1]= "2";
_thearray[2]= "3";
Class
Method 2:
var _thearray = new
The direct measure character of a regular expressionCharacter matchingAlpha-numeric characters themselves\o nul character (\u0000)T-place table (\u0009)\ n line feed (\u000a)\v Vertical Position table (\u000b)\f Page Feed (\u000c)\ r Carriage return
Copy Code code as follows:
Here are some of my share, I love programming, hope to be able to pay more programming enthusiasts, if you are also one of them, then please add friends, we pay attention to, the following article is that they feel
Nonsense not much said, directly to everyone to paste the code.
The above is a small set to introduce JavaScript navigation script to judge the current navigation, I hope to help you, if you have any questions please give me a message,
Change the mindset into a keyboard key event, as follows:
Here's a bit of a problem: you copy and paste, and you can't trigger this event. Here are some of the relevant code:
Copy Code code as follows:
function Fnamechange () {
if
First, we need to consider the layout of its source files, which is how the code splits into separate files. Why would you do that? Remember when I mentioned at the end of the last period that this component would use "External code"? To
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Run the above code, you can.
If you want to see how JavaScript indexof is used, see the following article
JavaScript indexof Function Usage
var strsex= "male";
In GB2312 encoding, suppose that another variable straxsex is a BSTR value that is read from an ActiveX control, and that the original value is "male", compared to the JavaScript program: Strsex==straxsex is False, which is
void operator usage format is as follows:
1. javascript:void (expression)
2. Javascript:void expression
Expression is an expression of the JavaScript standard to compute. The parentheses outside the expression are optional, but writing is a good
calls to functions and methods in 1,javascript
In JavaScript, there are two ways to call a function. The general way is to put the arguments in parentheses, and the other way is to put both the function and the arguments in parentheses. Such as:
1, using the Submit button submission, in form forms of the OnSubmit event for form verification:
Copy Code code as follows:
2, use button or picture of the OnClick event call form validation code:
Copy Code
1. The settimeout () method is used to call a function or evaluate an expression after a specified number of milliseconds.
SetTimeout () executes only one code at a time. If you want to call more than once, use SetInterval () or let code itself
This example describes the definition and usage of JavaScript event bubbling. Share to everyone for your reference, specific as follows:
in JavaScript bubble
> bubble in JavaScript dom DOM
The structure of the tree is:
JQuery plug-ins are usually divided into two categories.
Selector based plug-ins (support for chained operations)
Plugins that are not based on selectors (chained operations are not supported)
Some time ago a simple study of the
This article describes the common techniques for improving the performance of JavaScript. Share to everyone for your reference, specific as follows:
1. Attention Scope
as the number of scopes in the scope chain increases, the time to access
The demo below supports callbacks that can be referenced directly by modaldialog.js, without any shadow of jquery
Global.js
Copy Code code as follows:
Window.js = new Myjs (); To avoid duplicate names, add a myjs to the Window object,
A JavaScript basics technique, according to a string of characters specified in the string, to get the word specifier left or right string, in this case, the e-mail as an example, it can get the user name of the mailbox, and the user name outside
Mozilla recently submitted a draft to the consortium aimed at launching a JavaScript API that allows JavaScript scripts to manipulate local files directly, and the API has been heavily supported in Firefox's latest browser version, but for security
a universal function to get element text content People's Republic of China 1 2
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
Make a record of several easily-used properties in the HTML
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.