Some JAVASCRIPT event source objects that can be referenced during webpage Creation
Event. srcElement. tagName
Event. srcElement. type
Capture and release
Event. srcElement. setCapture ();
Event. srcElement. releaseCapture ();
Event buttons
Event. keyCode
Event. shiftKey
Event. altKey
Event. ctrlKey
Event Return Value
Event. returnValue
Mouse position
Event. x
Event. y
Form Activity element
Document. activeElement
Bind event
Document. captureEvents (Event. KEYDOWN );
Access form elements
Document. all ("txt"). focus ();
Document. all ("txt"). select ();
Form commands
Document.exe cCommand
Form COOKIE
Document. cookie
Menu events
Document. oncontextmenu
Create Element
Document. createElement ("SPAN ");
Obtain the element with the mouse:
Document. elementFromPoint (event. x, event. y). tagName = "TD
Document. elementFromPoint (event. x, event. y). appendChild (MS)
Form Image
Document. images [Index]
Form event binding
Document. onmousedown = scrollwindow;
Element
Document. Form. elements [Index]
Object binding event
Document. all. xxx. detachEvent ('onclick', );
Number of plug-ins
Navigator. plugins
Variable type
Typeof ($ js_libpath) = "undefined"
Drop-down list
Drop-down box. options [Index]
Drop-down box. options. length
Search for objects
Document. getElementsByName ("r1 ");
Document. getElementById (id );
Timing
Timer = setInterval ('rollwindow () ', delay );
ClearInterval (timer );
UNCODE Encoding
Escape (), unescape
Parent object
Obj. parentElement (dhtml)
Obj. parentNode (dom)
Exchange table rows
TableID. moveRow (2, 1)
Replace CSS
Document.all.css s. href = "a.css ";
Side by side
Display: inline
Hide focus
Hidefocus = true
Line feed Based on Width
Style = "word-break: break-all"
Auto refresh
Simple email
Quickly go to location
Obj. scrollIntoView (true)
Anchor
Anchors
Webpage Transfer Parameters
Location. search ();
Editable
Obj. contenteditable = true
Run the menu command
Obj.exe cCommand
Double-byte characters
/[^ \ X00-\ xff]/
Chinese characters
/[\ U4e00-\ u9fa5]/
Automatically wrap an English string out of the table width
Word-wrap: break-word; word-break: break-all;
Transparent background
Get style content
Obj.style.css Text
HTML Tag
Document.doc umentElement. innerHTML
First style label
Document. styleSheets [0]
The first style in the style label
Document. styleSheets [0]. rules [0]
When you click an empty link, the page is often reset to the top.
Word
Previous webpage Source
Asp:
Request. servervariables ("HTTP_REFERER ")
Javascript:
Document. referrer
Release memory
CollectGarbage ();
Disable right-click
Document. oncontextmenu = function () {return false ;}
Save prohibited
Deselected
Address bar icon
It is recommended that the favicon. ico name remain the same as 16 colors for 16*16. Put it in the root directory of the virtual directory.
Add to favorites bar icon
View Source Code
Disable Input Method
Automatically select all
ENTER to move the cursor to the next input box
Default Value of the text box
Title line feed
Obj. title = "123 sdfs"
Obtain the microseconds represented by the time
Var n1 = new Date ("2004-10-10". replace (/-/g, "\/"). getTime ()
Close Window?
Win. closed
Checkbox flat
Obtain selected content
Document. selection. createRange (). duplicate (). text
Automatic completion
Enable this function
Disable this function
Window Maximization
No close button IE
Window. open ("aa.htm", "meizz", "fullscreen = 7 ");
Unified encoding/Decoding
Alert (decodeURIComponent (encodeURIComponent ("http: // hello. com? As = hehe ")))
EncodeURIComponent for ":", "/", ";" and "? "Also Encoding
Table row indication
For more related articles, refer to PHP Chinese website (www.php1.cn )!