This article is simple enough to give you a summary of some common commands for JavaScript to get current information
Console.info ("document.") Url= "+ document. URL);Console.info ("document.location.href=" + document.location.href);Console.info ("
1. Delay Script Operation Method:
Method One: Put all JavaScript references in the element, after the page content, such as
Copy Code code as follows:
Example 1
Method Two: Define defer attributes
title
If you like this site, please recommend it to your friends!
The following is a code fragment:
Copy Code code as follows:
http://www.jb51.net
[ click Copy ]
http://www.jb51.net
[ click Copy ]
Many programs bypass this problem, often manually to decide where to truncate, too much trouble.
Implementation content: Truncate a section of text containing HTML code, but there is no containment tag does not have a closed problem.
A PHP version
I love you china Love you china China love you Love you, China ;d IV id= "TAG1" > I love you china Love you china China love you Love you china
[Ctrl + A All SELECT Note: If the need to introduce external JS need to
In JavaScript, functions can be easily serialized (string), which is the source of the function. But actually the internal implementation of the operation (the engine implementation) is not as simple as you might think. Two techniques for
If is one of the common syntax, the format is as follows
if (Coditon) statement1 (Else Statement2)
Where Coditon can be any expression, not even a true Boolean value, because JavaScript converts it automatically to a Boolean value.
Executes
Like other languages, JavaScript also has conditional statements that make judgments on the process. Includes various operations conforming to logical statements
comparison operator
The common comparison operator is equal to = =, not equal to! =,
A numeric value in JavaScript that you want to qualify as a number, without having to limit whether it is an integer or a floating-point type
Copy Code code as follows:
var num1 = 80;
var num2 = 55.51;
var num3 =-34;
var num4 =
One, variable
The ECMAScript variable is a loose variable, a loosely-typed variable, where a variable name can hold any type of data, and each variable is just a placeholder for saving a value.
Definition: var Firstdemo;
Ii. scope of the variable
JavaScript Math.floor Methodthe Math.floor method is used to rounded down a number to get the largest integer less than or equal to the value. The syntax is as follows:
Math.floor (x)Parameter description:
Parameters
Description
JS dynamic number of File upload control implementation code as described below:
dynamic number of file uploads File1: desc1: Increase
OK, the code is over, I hope to help you, if you have any questions welcome to
This article to share two ways to use JS to get the parameters of the URL, which method two is the use of regular expression method, we can choose according to the needs of a better method, nonsense not to say, directly look at the detailed
Now there is a horizontal iframe, you need to click on a picture outside the IFRAME to scroll across an IFRAME inside an HTML page, but do not want to see the IFRAME scroll bar, how to solve AH????
Demo.htm
onmousedown=
Compare the adjacent elements. If the first one is bigger than the second one, swap them both.Do the same work for each pair of adjacent elements, from the first pair to the end of the last couple. At this point, the final element should be the
1. Empty the input label is worth the time, can not use HTML ("") empty, to use Val ("") empty
2. If the event is bound multiple times, the callback function is executed several times after the event is triggered, all the best to write the function
Often use window.location, its structure is always unable to remember, simple comb, easy to query later.
Exampleurl:http://b.a.com:88/index.php?name=kang&when=2011
Property
meaning
value
Protocol
Write in frontSister article the transition effect of vue.js is-css. Today a blog reading volume 300, the heart is still a little excited. Yes, I am so easily satisfied (shy). This data may not even have a fraction of the amount of reading in an
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