One Variable
Use the VaR keyword inside the function body to define local variables.
Binary Value
Math. Round (), math. Floor (), and math. Ceil ()
Math. Random ()
Math. Abs ()
Tofixed () Parseint () and parsefloat ()
Three strings
This section describes other important things that need to be understood during Javascript encoding.Javascript is case sensitive.
A function named "myfunction" and a function named "myfunction" are two different functions. Similarly, variables
Javascript is object-orientedProgramming Language(OOP ).
The OOP language enables us to customize object and variable types.Object-Oriented Programming
Javascript is an object-oriented programming language (OOP ). The OOP language enables us to
Visible area width of the webpage: Document. Body. clientwidthVisible area height: Document. Body. clientheightVisible area width of the webpage: Document. Body. offsetwidth (including the width of the edge)Visible area height of the webpage:
This type of conversion is mainly used to encrypt JS Code.These two functions refer to the code of the [script house] (http://www.jb51.net/html/200707/23/10560.htm), but his function is wrong, I don't know why the author wants to write that way, so
This article describes how to compile maintainable JavaScript. We gradually add new features to an example throughout the full text and follow the following simple rules: Write A unit test and let it pass. Each test serves as a quality feedback loop
When you use IFRAME on the page, you generally do not want the IFRAME to display an ugly scroll bar to integrate the content in the iframe with the content on the home page. At this time, you will set the scrolling = "no" attribute. However, if the
I am excited to see that other blogs have the function of Running code from time to time. I think I often don't know how to use JavaScript. Unfortunately, my blog didn't bring this function, so I had to do it myself. The code is relatively simple.
What is reflection mechanism?The reflection mechanism means that the program can obtain its own information at runtime. For example, an object can know its methods and attributes at runtime.
Use (... In ...) Statement reflectionIn JavaScript, there
Not long ago, I made a script for page skin switching and encountered a very difficult problem. There were three style files, namely, the first line of the two files had a line of import url(default.css For the import sentence, and the sample format
select all or not
PS: (of course, if the all-selected box is another control, such as a button or a link, the checkitem click event in the check box can be removed to avoid errors)
Javascript annotations can be used to enhance code readability.Javascript comments
You can add comments to explain JavaScript or improve its readability.
What is a single row between two rows? // Start.
This example uses a single line comment to
Document directory
Syntax
Example
Variables are containers used to store information:
X = 5; length = 66.10;Do you still remember the Algebra I learned at school?
When you recall the algebra courses you have learned at school, you may think of
In addition to built-in JavaScript objects, you can also use JavaScript to access and process all html dom objects.More JavaScript objects
Click the following link to obtain more information about the following objects, including their collections,
Instance
Detect browsers and versions
Use JavaScript to check the name and version of a visitor's browser.
Detect more information about the browser
Use JavaScript to detect more information about the visitor's browser.
Document directory
3. Rewrite the content in IFRAME
Article transferred from: http://www.kuqin.com/webpagedesign/20081109/26336.html
Many people have always had an idea. It would be nice to operate IFRAME as they wish. In this way, static
In JavaScript, the valueof function method returns the original value of the specified object. Usage:
Object. valueof ()
An object is a required parameter and is an inherent JScript object.
The valueof method definition of each inherent
1. innerhtml Method
2. appendchild method http://www.cnblogs.com/changchangcc520/archive/2007/12/08/988088.htmlCode
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
No title page
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