I have learned the concepts of classes in Java, C #, and VB, and classes have functions such as inheritance, encapsulation, and polymorphism. Javascript is not an object-oriented language, but an explanatory language.
But we can also use JavaScript
In retrospect, ie will kill some blank spaces in the front of the tag, and all the labels in the tag will be capitalized. The dynamically added attributes will be displayed. In some elements, it is still read-only. It was chilling to find that this
ArticleDirectory
Charcode
The first problem is that there is no standard for button events. According to the standard, the event model containing the keyboard and other input devices will be explained in future Dom specifications.
ArticleDirectory
The name Type of the Javascript variable Hungary.
Javascript variable Hungary name Method
Syntax of the Hungarian name method:
Variable name = type + Object DescriptionType refers to the type of the
Jquery is like $ ("# txtname "). addclass ("Err" ).css ("font-size", "12px "). select (). the focus (); method is fascinating. The implementation mechanism is chained call. Chained call is to call the method of an object and return it to the object.
CodeAs follows:
Copy codeThe Code is as follows: var rxhtmltag =/(] *?) \/>/G,
Rselfclosing =/^ (? : Area | BR | Col | embed | HR | IMG | input | link | meta | PARAM) $/I,
Fclosetag = function (all, front, tag ){
Return rselfclosing. Test (TAG )?
1. Determine whether a form element exists (1)
CopyCode The Code is as follows: if ("periodpermonth" in document. theform)
{
Return true;
}
Else {
Return false;
}
2. Determine whether the page element exists Copy codeThe Code is as follows: if
If there is a Fibonacci series to be calculated:
CopyCode The Code is as follows: var maid = function (n ){
Return n };
I am afraid that a large number of browsers will collapse, because there will be a large number of repeated computations in the
1. First write two most commonly used and concise scrollingCode
The Code is as follows:
Horizontal scroll:
horizontal scrolling subtitle content
Vertical scroll:
vertical scroll content
2. smooth and uninterrupted Rolling
Copy code The
Click () object. Click () enables the object to be clicked.
Whether the closed object window has been closed; true/false
Cleartimeout (object) clears the set setTimeout object
Clearinterval (object) clears the set setinterval object
The confirm
Convert to boolean type All values in javascript can be implicitly converted to the boolean type, for example:0 = false; // true1 = true; // true''= False // trueNull = false // trueHowever, these values are not of the boolean type.Therefore, when
1. How to obtain the text of the selected part of the form field?
1
2
3
2. Two methods to hide and display page controls using JavaScript Javascript controls the hidden display of page controls. The difference between the two
Description supported by event Explorer
Onclick ie3 | N2 | O3 mouse click event. You can click the event within the control range of an object.
Ondblclick ie4 | N4 | O double-click event
Onmousedown ie4 | N4 | o the button on the mouse is
This is currently the world's shortest Javascript Method for Determining IE browsers from Russia! It has been tested in various versions of IE and other popular browsers. Although Microsoft has realized the Bug Based on IE, it has never been
JavaScript function call Rule 1
(1) Global function call:
Copy codeThe Code is as follows: function makeArray (arg1, arg2 ){
Return [this, arg1, arg2];
}
This is the most common way to define functions. I believe that JavaScript learners are
1. No prompt to refresh the webpage
Have you found that when refreshing some webpages, a prompt window will pop up and click "OK" to refresh the page. Some pages do not prompt. If the prompt window is not displayed, the page is refreshed directly.
PS: Display. You can adjust the image style as needed.
Code
Copy codeThe Code is as follows:
Function initimg (){
ShowImg (3 );
}
Window. onload = initimg ();
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