Prototype1.4 has seen a series of similar functions before:
Function $ (s) {return document. getElementById (s );}
I think it is very simple and practical. It was originally in the prototype library.
Now that you have a Chinese manual, it seems
Using Dom in Javascript to operate Xml 1. Xml files
Ii. IXMLDOMDocument/DOMDocument Introduction
2.1 attributes
2.1.1 parseError
2.1.2 async.
2.1.3 xml
2.1.4 text 3
2.1.5 attributes
2.1.6 nodeName
2.1.7 documentElement
2.1.8 nextSibling
2.1.9
Cross-browser setting of the innerHTML method Ajax is a good thing, but it is not so convenient to use. The problem is summarized as follows:
The creation method and usage method on various browsers are inconsistent
Different browsers have
During this time, setCapture (captureEvents) has been studying Js drag and drop issues for QZone. Today, we suddenly found that the drag-and-drop module of live.com can be used across browsers. In the end, what method can be used to trigger the
The perfect scaling of images is often used for product display pages in the company's work. Due to the different formats and sizes of the images uploaded by the customer, the scaling will lead to deformation, so I took some time on Sunday, I wrote
Js script learning is more practical basic event. clientX returns the last mouse X coordinate value;
Event. clientY returns the last mouse Y coordinate value;
Event. offsetX returns the X coordinate value of the current mouse hover.
Event. offsetY
Prototypeclass explanation // perfume bad 06-07-19 TKS: Lin Zi, to provide you with a place to share
Var Class = {
Create: function (){
Return function (){
This. initialize. apply (this, arguments );
}
}
}
You can rewrite the statement as
Web-based standard UI components-tree menu (2) from this article, you need to have some Javascript and DOM-related knowledge to continue learning. Since Javascript and DOM are not something that can be done in just a few words, if you are not
Some JS Code related to checking data. These JS Code are some code that is often used during form submission. Most of the Code is also written using regular expressions!
// Remove the left space;
Function ltrim (s ){
Return s. replace (/^ \ s */,""
Can your programming language do this? One day, you browse your code and find that there are almost the same two sections of code. They are actually the same-except for Spaghetti and Chocolate Moose ).
// A small example:
Alert ("I want to eat
How do I traverse object attributes?
Script function Employee (name, age, title, salary) // is the parameter or attribute in the brackets? How to traverse? {This. name = name; this. age = age; this. title = title; this. salary = salary; this.
Functions for playing music
The Code is as follows:
// JavaScript DocumentVar cookiestr;Var TotalSongs;// Insert the function of the entry to the song listFunction Insertsong (songstr ){Var tstr;Tstr = songstr. split ("| ");If (tstr. length = 5
Js event details. Event indicates the event status, such as the element that triggers the event object, the location and status of the mouse, and the key to be pressed.
The event object is valid only when an event occurs.
Some Properties of the
Let the text on the page 90 degrees, 180 degrees flip IE5.5 new function: rotating text, you can see it. The usage is as follows:
Obtain the writing method:
Object. style. writingMode
Set the writing mode:
Object. style. writingMode = sFlowDir
Select an infinitely scalable year
Script // select the infinitely extended year by PuterJam // ----------------------------------------------------- var Lastyear function selYear (obj, Cyear) {var len = 16 // select length var selObj = document.
Mobile phone number local detection original
Script function checkMobile () {var sMobile = document. mobileform. mobile. value if (! (/^ 1 [3 | 5] [0-9] \ d {4, 8} $ /. test (sMobile) {alert ("the first seven digits are not the complete 11-digit
Enter a Tab in textarea
Script function editTab () {var code, sel, tmp, r var tabs = "" event. returnValue = false sel ready event.srcelement.doc ument. selection. createRange () r = event. srcElement. createTextRange () switch (event. keyCode)
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