Of course, we can also use regular direct matching, the article also gives a regular example.
How to explode a link:
Copy Code code as follows:
to match in a regular way:
Copy Code code as follows:
Copy Code code as follows:
function Searchparse () {
var resultobj = {};
var search = Window.location.search;
if (search && search.length > 1) {
var search = search.substring (1);
var items = search.split (' & ');
for (var index
Although not a very complex implementation, but each time it would be cumbersome, so I wrote a small script to automatically generate this output window.
Code
Copy Code code as follows:
Window. Babu = {};
babu.debugging = {};
Image above:
Note the following code, it is best to save the utf-8 format, or easy to appear garbled.
Copy Code code as follows:
javascript powerword Online Network translation
Fortunately, there is anything online, the internet to find a browser compatibility of the best function, tested compatible with IE, FireFox, Chrome, and will not have the error of the scroll bar, archive, for later use:)
Copy Code code as
Copy Code code as follows:
function ontreenodechecked () {
var ele = event.srcelement;
if (Ele.type = = ' checkbox ') {
var childrendivid = ele.id.replace (' CheckBox ', ' Nodes ');
var div = document.getElementById (childrendivid);
if
When we want to read some information about the event, we often drown in a large number of attributes, most of which do not run well in most browsers. Here is the compatibility List for the event.
I'm not going to make a list of these attributes,
Now that we have registered the event handler, we would like to have a deeper understanding of the event. We wanted to know where the mouse was when the event occurred, and we wanted to know which keys the user pressed. These are all possible,
The code is as follows:
Copy Code code as follows:
/*!
*author:sohighthesky
*blog:http://www.cnblogs.com/sohighthesky
*date:2010-2-4
*/
var zooming=function (e) {
e=window.event | | E
var O=this,data=e.wheeldelta | |
Achieve one:
Copy Code code as follows:
* * Prosaic Method * *
function pad (num, n) {
var i = (num + ""). Length;
while (i++ return num;
}
The code above is so prosaic that it doesn't reflect my true level. So there
Generally in JavaScript, the array is traversed by using a for loop, as in the following
Copy Code code as follows:
var arr = [];
for (var i=0; iLoop
}
The biggest problem with this code is that it gets. Length at every
1. How do I get the text for the selection of a form field?
1
2
3
two ways to control hidden display of page controls in 2.javascript
JavaScript controls the two ways that page controls hide the display, except that they are still
Copy Code code as follows:
function Addeventsimple (OBJ,EVT,FN) {
if (Obj.addeventlistener)
Obj.addeventlistener (Evt,fn,false);
else if (obj.attachevent)
Obj.attachevent (' on ' +evt,fn);
}
function Removeeventsimple
javascript =>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]
JavaScript Reverse () methodIn this case, we'll create an array and then reverse the order of its elements:
The following four functions are part of it.
first we want to add a browser detection script:
Copy Code code as follows:
/************************************
* Detection Browser
***********************************/
var user =
1. Determine if the form element exists (i)
Copy Code code as follows:
if ("Periodpermonth" in Document.theform)
{
return true;
}
else{
return false;
}
2. Determine if the page element exists
Copy Code
Copy Code code as follows:
/*written by XP in 8z at Mar 4,2010.qq:251089096*/
var suseragent = navigator.useragent;
var Isie=isie6=isie7=isie8=isfirefox=false;
if (Suseragent.indexof ("MSIE") >-1) {
Isie = true;
var version =
1. Defining Types
Copy Code code as follows:
function UserObject (parameter) {
}
parameter can be omitted, equivalent to the constructor parameters in C #.
2. Instantiate a custom type
Copy Code code as follows:
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