each language has its own special place, for JavaScript, the use of Var can declare any type of variable, the scripting language seems very simple, but to write elegant code is the need for continuous accumulation of experience. This article
SplitMethod:
The following program example implements the use of Split and integer string interchange ...
function Evil ()
{
var toint=parseint ("123");//string converted to plastic
var intvalue=123;
var tostr=intvalue.tostring ();//type converted
JavaScript Reference Tutorials
This tutorial provides a more complete primer for readers who are not exposed to JavaScript, but is limited to the basics: all JavaScript closely related to dynamic Web pages is not mentioned in this tutorial,
While statement:
Copy Code code as follows:
var i = 1;
while (I{
document.write (i);
i++;
}
Do While statement:
Copy Code code as follows:
var i = 1;
Todo
{
document.write (i);
i++;
}while (I
From the example
have been so busy lately, take advantage of 51 to update the program.
This edition mainly adds and improves the following things:
1, to compare the string to Localecompare instead;
2, multiple Sort objects can be used in one sort (reorder when
The scope is one of the most important concepts of JavaScript, and to learn JavaScript well you need to understand how JavaScript scopes and scope chains work. Today's article provides a simple introduction to JavaScript scope and scope chain,
In JavaScript, you often encounter situations where you want to listen to multiple Li in a list, assuming we have a list of the following:
Copy Code code as follows:
item1
item2
item3
item4
If we want to achieve
1, what is arguments
Arguments is a built-in object in JavaScript, it's quirky and often overlooked, but it's really important. All the major JS libraries use the arguments object. So agruments objects must be familiar to JavaScript programmers. In
Most programming languages have several numeric data types, but JavaScript has only one. You can use the TypeOf operator to see the type of numbers. Whether it's an integer or a floating-point number, JavaScript simply categorizes them as numbers.
Capability Testingthe ability to detect a particular browser before writing code. For example, a script might have to detect the first payment of a function before calling it. This method frees developers from considering specific browser types and
Order
I did not appear in the recommendation column for a long time, it seems that a good response, so the continuation of the article.
Properties
? When accessing properties, we use the dot (.) operator.
var Luke = {
Jedi:true,
Age:28
};
Bad
var
Article Introduction: in JavaScript, we can use the instanceof operator to determine whether an object is an instance of a class, and if Obj instaceof class returns True, then we think that obj is an instance of class, and obj is created by class,
Core tips: Rules for JavaScript Library developers
1. Keep Non-invasive My HTML tags don't want to know your JavaScript code.
2. Modification and extension of object.prototype! is strictly prohibited This is important and requires a rule that is
Reference | objects | Names of array name option lists (name attribute)
Number of options in the Options list
Index of selected in the list of Selectedlndex options (location)
Text after marking in the Text option list (option)
value= attribute in
Javascript| Error
JScript run-time Error
A JScript Run-time error is an error that occurs when a JScript script attempts to perform an action that the system cannot run. When you are running a script, evaluating a variable expression, or you are
A few days ago in the gap time in reading mastering Regular expressions this book. It is a good book about regular expressions, and I should buy one. It is now temporarily borrowed from the Avik to buy the third edition of the Chinese version to
JavaScript reads and writes the delete cookie operation.
function Getcookieval (offset)Get the value of the cookie after decoding{var endstr = document.cookie.indexOf (";", offset);if (endstr = = 1)Endstr = Document.cookie.length;Return unescape
function is used in JavaScript to create functions or methods, but to implement object-oriented programming, classes are one of the indispensable roles and protagonists. But there is no class concept in JavaScript, and the so-called class is also
In JS, Google remembers the function of changing the color of the password input box. js Google
Google remembers that the color of the password input box will change, and the font color will change to black,
The original style in the input box is
Examples of mini-program custom dialog box and mini-program details
Examples of the mini-program custom dialog box
:
Index. wxml:
click enter the content cancel true set
Index. js:
Var inputinfo = ""; var app = getApp () Page (
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