JavaScript Events Encyclopedia

Source: Internet
Author: User

The click () object. Click () causes the object to be clicked.
Closed object. Closed Object window is closed True/false
Cleartimeout (object) clears the SetTimeout object that has been set
Clearinterval (object) clears the SetInterval object that has been set
Confirm ("hint message") Popup confirmation box, OK return true cancel return False
Cursor: Style change mouse style hand crosshair text wait help default auto

E/s/w/n-resize

Event.clientx returns the x-coordinate value of the last mouse click;
Event.clienty returns the last mouse-click y-coordinate value;
EVENT.OFFSETX returns the current mouse hover x coordinate value
Event.offsety returns the current mouse-hover y-coordinate value

document.write (document.lastmodified) page last update time
Document.ondblclick=x when double-clicking the mouse generates an event
Document.onmousedown=x Click mouse button to generate an event

Document.body.scrollTop; Returns and sets the coordinate value of the current vertical scroll bar, which must be mated to the function

,
Document.body.scrollLeft; Returns and sets the coordinate value of the current horizontal scrolling service, which must be fitted with the function

Compliance
Document.title document.title= "message"; Title bar text for the current window
Document.bgcolor document.bgcolor= "color value"; Change window background color
Document. Fgcolor document. fgcolor= "color value"; Change the body color
Document.linkcolor document.linkcolor= "color value"; Change the hyperlink color
Document.alinkcolor document.alinkcolor= "color value"; Change the color of the positive click Join
Document. Vlinkcolor document. vlinkcolor= "color value"; Change the color of an visited join
Document.forms.length returns the current page form singular
Document.anchors.length returns the number of anchor in the current page
Document.links.length returns the number of current page joins
Document.onmousedown=x Click the mouse to trigger the event
Document.ondblclick=x double-click Mouse Trigger Event
Defaultstatus Window.status=defaultstatus; Display the status bar settings by default

function function xx () {...} defining functions
IsNumeric Judging whether it is a number
InnerHTML xx= object. InnerHTML Enter the HTML source code in an OBJECT tag
InnerText Divid.innertext=xx will set the object value named for div positioning to XX

Location.reload (); Make this page refresh, target can be equal to a refreshed Web page

Math.random () random number of the number, can only be between 0 and 1, if you want to get the other number, can be *10, and then

Take the whole
Math.floor (number) Converts an object number to an integer, rounding all decimals
Math.min back to which small
Math.max back to which big

Navigator.appname returns the current browser name
Navigator.appversion returns the current browser version number
Navigator.appcodename returns the current browser code name
Navigator.useragent returns the current browser user token

OnSubmit onsubmit= "return (XX ())" Using function return value
Opener Opener.document. Object control original Open Form object

Prompt Xx=window.prompt ("Prompt Information", "predetermined value"); Input statement
Parent parent. Frame name. Object Control Framework Page

Return return false Returns value
Random parameters (between 0 and 1)
Reset () Form.reset (); Reset the data in form form

Split ("") String.Split ("") separates string object Word utilises comma
Submit () Form object. Submit () Make the form object commit data

The CharAt (x) object of the String object returns the letter of the number of bits of the specified object
LastIndexOf ("string") right-to-left polling for the specified character, no return-1
IndexOf ("string") is consulted from left to right for the specified character, no return-1
lowercase () Convert all objects to lowercase
Uppercase () Convert all objects to uppercase
SUBSTRING (0,5) string.substring (x,x) returns the characters from 0 to 5 in the object
SetTimeout ("function", time) sets a timeout object
SetInterval ("function", time) sets a timeout object

toLocaleString () x.tolocalestring () Gets the time from the X-time object, in string form

Exist
typeof (variable name) checks the type of the variable, with the following values:

string,boolean,object,function,underfined

WINDOW.EVENT.BUTTON==1/2/3 mouse key left key equals 1 right key equals 22 keys pressed together as 3
Window.screen.availWidth returns the current screen width (blank space)
Window.screen.availHeight returns the current screen height (blank space)
Window.screen.width returns the current screen width (resolution value)
Window.screen.height returns the current screen height (resolution value)
Window.document.body.offsetHeight; Returns the current page height
Window.document.body.offsetWidth; Returns the current page width
Window.resizeto (0,0) Set the window to a wide height
Window.moveto (0,0) Move the window to a location
Window.focus () causes the current window to have focus
Window.Scroll (x, y) window scrollbar coordinates, Y-control moves up and down, must mate with function
window.open () window.open ("Address", "name", "property")
Properties: Toolbar (Toolbar), location (address bar), Directions,status (status bar),
MenuBar (menu bar), scrollbar (scroll bar), resizable (change size), width

(width), height (high), fullscreen (full screen), scrollbars (no scroll bar without parameters at full screen)

Number, Channelmode (widescreen), left (open window x coordinate), Top (open window y-coordinate)
window.location = ' View-source: ' + window.location.href application event viewing network

Page source code;


A=new Date (); Create a for a new time object
Y=a.getyear (); The value of Y is the two-digit year from object A that gets the year value
Y1=a.getfullyear (); Get four-digit year of the year
M=a.getmonth (); Get month value
D=a.getdate (); Get Date value
D1=a.getday (); Gets the current week value
H=a.gethours (); Gets the current number of hours
M1=a.getminutes (); Gets the current number of minutes
S=a.getseconds (); Gets the current number of seconds


object. style.fontsize= "Text Size";
Unit: mm/cm/in inch/pc pa/pt point/px pixel/em text high
1in=1.25cm
1pc=12pt
1PT=1.2PX (800*600 resolution)

Text Font properties:
FontSize size
Family fonts
Color colors
FontStyle style, value is normal, italic italic, oblique italic and bold
FontWeight, with values ranging from 100 to 900, 900 the most coarse, light,normal,bold
letterspacing spacing, change the distance between text, take value, 1pt,10px,1cm
TextDecoration: Text modification; value, none not decorated, underline underlined, overline underlined
Background: Text background color,
BackgroundImage: Background image, value as the insertion path of the picture


Click the Web body function to invoke the trigger:

1.onClick when the object is clicked
2.onLoad when the Web page opens, can only be written in the body
3.onUnload when the page closes or leaves, it can only be written in body
4.onmouseover when the mouse hangs over it
5.onmouseout when the mouse leaves the object
6.onmouseup when Mouse is released
7.onmousedown when the mouse presses the key
8.onFocus when an object gets focus
9.onSelect when the text of an object is selected
10.onChange when the contents of the object are changed
11.onBlur when the object loses focus
Value returned when Onsubmit=return (SS ()) Table is monotonic

Straight border-bottom:1x solid Black
Dashed border-bottom:1x dotted black
Dot Dash border-bottom:2x dashed black
Dual line border-bottom:5x Double black
Groove border-bottom:1x Groove Black
Ridge-shaped border-bottom:1x Ridge Black


1. Edge Highlight Glow (color= color, strength= brightness size)

2. Flip horizontal fliph () to flip the object horizontally 180 degrees

3. Vertical Flip FLIPV () flips the object vertically 180 degrees

4. Object blur Blur (Add=true/false direction= Direction strength= strength)
Add specifies whether the fuzzy direction fuzzy direction strength fuzzy intensity according to the impression painting school
5. Object transparent Alpha (OPACTION=0-100,FINISHOPACITY=0-100,STYLE=0/1/2/3)
Opaction The overall opacity value of the object finishopacity when the object takes advantage of the fade transparency, the item specifies the end

The opacity value of the clear position style specifies transparent mode 0 is overall transparent, 1 is linetype transparent, 2 is round transparent

, 3 is rectangular transparent
6. Remove color chroma (color= color value) to make the color in the object transparent to the same area as the specified color
7. Create Shadow DropShadow (color= shadow color, offx= horizontal to left, offy= horizontal

Stray pixels)
8. Color Gray () to display the object in grayscale
9. Negative effect invert () causes the object to appear as a negative effect
10. Highlight light () to make the object appear black
11. Mask Mask (color= color) causes the entire object to be masked once with the specified color

Opacity table transparency level. 0~100,0 table fully transparent, 100 sheets completely opaque
Finishopacity table you want to set the gradient transparency effect. 0~100.
Style table The shape of the transparent area. 0 Table uniform shape. 1 Table linear. 2 Table radial. 3 Table rectangle.
Startx.starty the x and Y coordinates at the beginning of the table gradient transparency effect.
Finishx,finishy the coordinates of x, y at the end of the fade transparency effect.
Add has to determine if there are original targets in the Blur effect. The value is 0,1.0 table "No", 1 table "Yes".
Direction sets the direction of the blur. The 0-degree table is vertically upward and 45 degrees is one unit. The default value is 270 to the left

Degrees. Left,right,down,up.
Strength can only be determined with integers. The width of the number of pixels represented is blurred. Default is 5

A.
Color to be transparent.
Offx,offy is the offset of the shadow in X, Y direction respectively.
Positive refers to the projection mode. 0 Table transparent pixels generate shadows. 1 The table only gives the opacity pixels to generate shadows.

Addambient: Joins the surrounding light source.
Addcone: Add cone light source.
Addpoint Adding Point Light
Changcolor: Change the color of the light.
Changstrength: Change the intensity of the light source.
Clear: Clears all lights.
Movelight: Move the light source.

The freq is a ripple frequency that specifies how many finished ripples are required to be produced on an area of the object.
Lightstrength can be used to enhance the effect of light and shadow. Significant 0~100 positive integer, sine wave start position

It's 0~360度. 0 tables start at 0 degrees, and 25 tables start at 90 degrees.
Strength table amplitude size.


Hand style= "Cursor:hand"
Crosshair style= "Cursor:crosshair"
Text style= "Cursor:text"
Wait style= "Cursor:wait"
Default style= "Cursor:default"
Help style= "Cursor:help"
E-resize style= "Cursor:e-resize"
Ne-resize style= "Cursor:ne-resize"
N-resize style= "Cursor:n-resize"
Nw-resize style= "Cursor:nw-resize"
W-resize style= "Cursor:w-resize"
S-resize style= "Cursor:s-resize"
Sw-resize style= "Cursor:sw-resize"
Se-resize style= "Cursor:se-resize"
Auto style= "Cursor:auto"

JavaScript Events Encyclopedia

Related Article

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.