First Take "http://www.cnblogs.com/wuxibolgs329/p/6188619.html#flag?test=12345" as an example, and then get the various components of it.
1, get the complete URL of the page
var a=location.href;
Console.log (a);
The example in this article analyzes the use of this in JavaScript. Share to everyone for your reference, specific as follows:
One. " This "axiom
The This keyword always points to the owner of the function (method);
function fn1 () {
This example for you to share a very practical JS clips for your reference, the specific contents are as follows
1. How to distinguish IE and non ie browsers:
if (!+[1,]) {//ie 11 does not support
alert ("This is IE browser");
}else{
alert (
Objective
A problem has recently been encountered with the need to compute duplicate values of two-dimensional arrays using JavaScript, as there is a two-dimensional array below
[[\ ' error\ ', 3],[\ ' error\ ', 5],[\ ' error\ ', 6],[\ ' true\
In fact, this effect is not difficult to do.
The hard part is how to make the user easy to use.
The first checkbox implements a select-and-Select
The last checkbox implements the cancel selection
Here just do a JS example.
There is no real
Code
Copy Code code as follows:
User name:
//Validation results show that the display is hidden
Password: //pwd event when the input box gets focus, verify that the contents of the Name input box are formatted correctly
Copy Code code as follows:
first option
second option
third option
your browser can ' t handle this script
Use the following code to access the selected items in the dropdown box:
Copy Code code as follows:
The following is an example of a situation type= "text":
Copy Code code as follows:
By calling the JS Refresh method
Method One
Copy Code code as follows:
function Refresh ()
{
var
js gets the position in the text box (Text/textarea) where the cursor is located jb51 hello!
;/html>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
The above code is mainly used for JavaScript date processing techniques and settimeout implementation date refresh.
1. Add the following code to the
Copy Code code as follows:
2. Add the following code to the
Onload=startclock ()
3. Insert the following code where the time is displayed, and recommend that you use a table location
[Code]
Copy Code code as follows:
/**
*
* Returns a formatted date, such as September 5, 2009 14:15:23, for a long time from now.
* such as: Now Time is September 5, 2009 14:15:23 timelong=10 seconds then return: September 5, 2009 14:15:33
*
*
nvida website picture sliding-http://www.jb51.net 1 2 Next back
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
The specific usage is this:
Putting JavaScript code in front of (putting script code at the bottom of the page helps improve page speed, but I don't have a personal experience right now)
Copy Code code as follows:
Here is
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