/* Parses string type into date type.
Parsedate ('1970-1-1 ') return new date (2006, 1)
Parsedate ('2006-1-1 ') return new date (, 1)
Parsedate ('1970-1-1 15:14:16 ') return new date (2006)
Parsedate ('2006-1-1 15:14:16 ') return
Congratulations, the Chinese translation of "javascript Secret Garden" was officially adopted by the official, you can visit at any time through the official website: http://bonsaiden.github.com/JavaScript-Garden/zh/
As this document is constantly
There is an excellent article namedOptimizing JavaScript code. The authors are software engineers on GmailAnd Google Chrome.
I appreciate the knowledge described in this article and try to repeat it in myOwn Words.
Faster String concatenation
In some webpages, the "#" in herf is changed to javascript: void (0), because # contains a location information, the default anchor is # top, that is, the top of the web page. javascript: void (0) only indicates a dead link.This is why sometimes a
10 examples of JavaScript special effects make your website more attractive
Today's topic is how to improve the interface of your website or improve the visual experience of your website, so that users can still remember it.
There are three main
1. Method overload
JS does not directly support method overloading similar to C #, so it can only be solved in disguise.Code(Using the built-in attribute arguments)
VaR F1 = function (P1, P2, P3) {Switch (arguments. length) {Case 0: Alert ("F1
At one time, I thought that in the Javascript world, all methods are public and cannot be technically defined as a private method. Today I found again that I was wrong!
VaR person = function (name, sex) {This. name = Name; this. sex = sex; VaR _
When the page is too long (more than 3 screens) and there are many images, the browser loads all the images by default, which may cause the pictures on the second screen to be displayed, however, the images on the first screen are still being loaded.
I have tried Ajax.Code: here But what does void (0) mean?
In JavaScript, void is an operator that specifies to calculate an expression but does not return a value.
The format of the void operator is as follows:1. javascript: void (expression)2.
When writing a piece of js code today, I found that there are some differences between IE and FF when loading HTML elements dynamically.Code:
ff and IE dynamic loading elements awbpre: awbno:
When you click the Add button,
/* Function definition */function a () {return 1;} var B = function () {return 1 ;}; var c = function D () {return 1 ;}; // D === undefinedvar E = new function ("return 1;"); alert (typeof A); // functionalert (typeof B ); // functionalert (typeof C)
P44
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
1
Script Type
=
"
Text/JavaScript
"
>
2
Function
Person (firstname, lastname, age)
{ 3 VaR _ Firstname =
today, I met a need to use JavaScript to replace some parameters in the URL. I think of a parseurl function that I just found from Mr. Situ's blog, Code :
// Analyze the URL function parseurl (URL) {var A = document. createelement ('A');. href =
Keywords: Javascript OOPObject-orientedJScriptPrototype Prototype
Abstract:
In the original "Object-OrientedJavascriptProgramming, the author proposed throughJavaScript (To be exact, the above isMicrosoftOfJScript)To achieveOOPIn the original
ArticleDirectory
1. Auto-Match Height
2. Transparent support for IE6 PNG
4. CSS browser Selector
5. minimum/maximum height/width support
6. Vertical/horizontal center of Elements
7. Use the Q tag in IE
We advocate
This is a basic article. It uses JavaScript to observe the event bubbling mechanism in the Dom and describes how to block default behavior and how to organize event bubbling.
1. The first example can be run in Firefox.
Code highlighting produced by
Document directory
Instance 1 captures the mouse key code and keyboard key code on the screen
Instance 2 rewrite the right-click menu
Obtain
Common event object data
I. Summary
This series of articles aims to abstract common, cross-Browser
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.