jquery has a lot of such plug-ins, but our company does not need jquery, no plug-ins, so I try to write on my own, I do not know how other people write, purely in accordance with their own ideas.
Directly on the code:
Copy Code code as
As shown below:
Copy Code code as follows:
Untitled Document
China guangzhou China Shanghai China Beijing China Wuhan Add to Right--> Choose your area from the left yle
Today, when I was doing a project, I met a very strange question. My program in HTML, run well, replace the JSP in the project run, has been reported $ is not a function error. Looking for a long time, tried a lot, did not solve. Later, suddenly
The following is the program code:
Copy Code code as follows:
Image Rollover Effect
Text description text description Text
Text description text description Text
Text description text description Text
Copy Code code as follows:
var Map = function () {
This._entrys = new Array ();
This.put = function (key, value) {
if (key = null | | | key = = undefined) {
Return
}
var index = This._getindex (key);
if (index = = 1) {
var entry =
The JavaScript Zhongyuan type (prototype) defines properties and methods that are accessible to all instances of a particular type, and in many cases needs to be assigned to a property in the stereotype, if the method error results in unexpected
Get Value:
Label labels are used in JS and jquery and cannot get their values with value like other tags:
Copy Code code as follows:
var Label=document.getelementbyid ("id");
var Value=label.value;
var value=$ ("#id"). Val ();
1 determining whether an array type
2 determining whether a string type
3 Determining whether a numeric type
4 Determine whether the date type
5 judge whether it is a function
6 Determine whether or not an object
1 determining whether an array type
When we want to do dynamic import JS file, we can use the following method
Copy Code code as follows:
var Docfunc = {
/***************************************************************************
* Purpose: Invoke the following
Copy Code code as follows:
/**
*
* Description: JS implementation of the Map method
* @returns {MAP}
*/
function Map () {
var struct = function (key, value) {
This.key = key;
This.value = value;
};
Add Map key value pair
var put =
The third of the following pro-test is available
First type:
Copy Code code as follows:
if (Window.addeventlistener) {
Alert ("Not IE");
}else if (window.attachevent) {
Alert ("is IE");
}else{
Alert ("This happens in older
1, compare the date size of the JS code
Copy Code code as follows:
2,js Compare time and date size
Copy Code code as follows:
calendar-Compare time and date sizes-www.jb51.net
Start time: To
End time:
The Offsetparent property returns a reference to an object that is closest to the element that calls offsetparent (closest in the containing hierarchy) and is a container element that has been positioned as a CSS. If the container element is not
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