Copy Code code as follows:
/**
* Date into time stamp
* Date format 2011-02-02 21:12:13
* TIME_STR: Date period 2011-02-02
* Fix_time: Time period 21:12:13
*/
function Strtotime (TIME_STR, Fix_time) {
var time = (new Date ()).
Each node in the document is available in JavaScript
parentnode--parent Node
firstchild--first child node
lastchild--Last child node
previoussibling--next to the brother node of the front
nextsibling--next to the sibling node
Five
Some time ago wrote a tabs tab switching effect, today in the original based on the expansion, joined the automatic Carousel, which became similar to the effect of the picture carousel.
HTML code:
Copy Code code as follows:
Recently done a tax on the function, it is worth saying that the slider implementation of this page. We all know that most of the real programmers are not familiar with the page and art.
I am also, but I prefer to do their own work to achieve.
The SetTimeout method is the timer program, which is what to do after the time. Just finish it.The SetInterval method is to indicate that an operation is repeated at a certain time interval.If you implement the function of Setinerval with settimeout,
This keyword is the best way to create a class when you want each of the following new classes to have some generic variables or other functions.
Of course, since it is an object-oriented language, there must be a problem with access rights, and
The program is also very simple, is to traverse the local directory, and then generate a bunch of FTP commands.
Copy Code code as follows:
function Matchdemo (strfoldername)
{
var s;
var re =/200\d{5}/ig;
s = Strfoldername.match
This thing many people wrote, but today temporarily need to use when can't find meet the demand, so immediately to write a, since all finished and also full meet the needs of the put up to let everyone whip a whip.
The requirement is simple, a text
how JavaScript objects are defined
1. var obj = new Object ()
Copy Code code as follows:
New Document
2. var obj = {};
Copy Code code as follows:
New Document
In general, the results of the two calls are the same, but there is a difference.
The first way:
Copy Code code as follows:
function A () {
Alert (' old ');
}
var b=a;
function A () {
b ();
Alert (' new ');
}
A
The first time you use this, make a note, and invoke the local program in the HTML page:
Copy Code code as follows:
Please enter the program path to run:
OK
Demo Address:
http://www.ihuxu.com/project/gcdmove/
Call Example:
var GCDM = Gcdmove (odiv,100,0);
Gcdm.startmove ()/Start movement
Gcdm.stopmove ()/End movement
This section of JS code has been encapsulated, the code is as follows:
Brief
Read the reading notes of high performance JavaScript
Several principles:
1, put the script on the bottom
in head, to ensure that before JS load, can load the normal display of the page.
inline and external files
with the Defer property can
The way to add CSS is inline, inline, outside chain type, import type
A) dynamic introduction of style sheet files:
Copy Code code as follows:
function Loadlink (URL) {
var link = document.createelement ("link");
Link.type =
In the previous introduction, we discussed the Close () method:
Copy Code code as follows:
Win = window.open ("http://www.jb51.net/", "JS");
Win.close ();
JavaScript provides a number of methods and properties that we can use
The JQuery library can be added to a Web page with a single line of markup.JQuery Library-Features
JQuery is a library of JavaScript functions.
The JQuery library contains the following features:
HTML element Selection
HTML element
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.