Math object Method
Math. Ceil (x) returns the smallest integer greater than or equal to X;
Math. Floor (x) returns the largest integer less than or equal to X;
Math. Round (x) rounds a decimal number to an integer;
Math. Pow (x, y) power
/* factory method --- create and return the factory function of a specific type of object */ function createcar (color, doors, mpg) { var tempcar = new object; tempcar. color = color; tempcar. doors = doors; tempcar. MPG = MPG; tempcar.
The basic object is an internal object. In JavaScript, there are two situations for referencing object attributes and methods:
Static internal object, that is, you do not need to create an instance for the object when referencing its attributes or
Several object-specific statements and operators are provided in JavaScript.
1. For... in Declaration, used to perform cyclic operations on the attributes of an array or object.
Each time the Code in the for... in loop is executed, an operation is
Browser object (Navigator)
Provide information about browsers
Window object)
The window object is at the top of the object hierarchy. It provides methods and properties for processing the Navigator window.
Location)
The location object provides
To] window objects:
One window attribute1. Get the object of the current window: window. frameelementVaR frameobj = Window. frameelement;Obtain the name of the current window: frameobj. NameObtain the number of frames in the current window:
The transformation from purely Object-oriented Thinking (Java thinking) to Object-oriented Thinking in Javascript language has experienced severe pain. The concept conversion of objects and classes in Javascript is confusing. Sometimes, the clearer
Introduction
PostBackIs a concept introduced in ASP. NET and is a very handy method. PostBackIs built into the ASP. NET and most of the Web controls support itWithout writing any code.Calling PostBack event from Javascript
ThereMay be some scenario
// Loading the page: onload = "loadtreeview ()"; // The check event that registers the Treeview when the server is loading: treeview1.attributes. add ("oncheck", "tree_oncheck (treeview1)");
Post:
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:
Original post address:
Http://www.cnblogs.com/huacn/archive/2007/07/23/javascript_firefox_xml_document_selectNodes.html
Recently, I was modifying the page on which the Ajax function was used in the project. I found that many of the statements were
// Determine whether it is a date
// Note: you cannot accurately determine the date of January 1, February in a leap year. js must be used for additional processing.
Function isdate (STR){VaR patt =/^ ([1-9]) | (0 [1-9]) | (1 [012]) [-. /] (0? /D)
This article describes seven JavaScript encryption methods:
During webpage creation (in fact, webpage Trojans), the most annoying thing is that the JavaScript code running on IE, a client that has worked hard, is often easily copied by others,
Today, I saw the JS Implementation of the ID card number 15 to 18 when the last digit of the algorithm "Article (http://www.webjx.com/htmldata/2005-10-24/1130111668.html), found that one of the very big error, that is, the year is not completed, the
I have been learning JavaScript during this time and encountered such a problem while learning arrays.A piece of code is provided:
Analysis on the book:
However, during the test, I found that week [0] ~ Week [3] does not seem to be initialized as
The simple knowledge of JavaScript has been summarized above. You are welcome to exchange and learn. The learning relies on theory + practice. Through the Javascript special training by Mr. Jiang Hao, you have deepened your understanding of the
The node. js module system has two important features:
1. variables defined using VAR in a module only apply to the current module, rather than the global one.
2. You can use the "require" and "module" global variables in each module ". The reason
This article was first published on the iteye blog at the original address.
Author: Zhang weibin (Weibo) thanked the dojo Chinese blog for its originality and translation of a large number of excellent articles. I am willing to use this platform to
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