Javascript event collection

Source: Internet
Author: User
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 ("prompt message") dialog box is displayed. Confirm to return true. Cancel to return false.
Cursor: style to change the 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 clicked;
Event. clienty returns the last mouse y coordinate value;
Event. offsetx returns the X coordinate value of the current mouse hover.
Event. offsety returns the Y coordinate value of the current mouse hover.

Document. Write (document. lastmodified) Last Update Time of the webpage
Document. ondblclick = x: an event occurs when you double-click the mouse.
Document. onmousedown = x click the mouse key to generate an event

document. body. scrolltop; returns and sets the coordinate value of the current vertical scroll bar, which must be used with the function.
document. body. scrollleft; returns and sets the coordinate value of the current Horizontal Rolling task, which must be used with the function.
document. title document. title = "message"; title bar Text of the current window
document. bgcolor document. bgcolor = "color value"; change the background color of the window
document. fgcolor document. fgcolor = "color value"; change the body color
document. linkcolor document. linkcolor = "color value"; change the hyperlinking color
document. alinkcolor document. alinkcolor = "color value"; change the color of the click link
document. vlinkcolor document. vlinkcolor = "color value"; change the color of the accessed link
document. forms. length returns the number of form forms on the current page
document. anchors. length returns the number of anchors on the current page
document. links. length returns the number of connections on the current page
document. onmousedown = x click the mouse to trigger the event
document. ondblclick = X double-click mouse trigger event
defaultstatus window. status = defaultstatus; set the status bar to display by default

Function function XX () {...} defines a function
Isnumeric determines whether it is a number
Innerhtml xx = object. innerhtml: Enter the html in an object tagSource code
Innertext divid. innertext = xx

Location. Reload (); refresh the current page. The target can be equal to a refreshed webpage.

Math. Random () random Han number, which can only be a number between 0 and 1. To get another number, it can be * 10 and then rounded up.
Math. Floor (number) converts the object number into an integer and returns all decimals.
Which of the following values is returned for math. Min (1, 2 )?
Which of the following values is returned for math. Max (1, 2 )?

Navigator. appname: returns the name of the current browser.
Navigator. appversion: returns the current browser version.
Navigator. appcodename: returns the current BrowserCodeName
Navigator. useragent returns the user ID of the current Browser

Onsubmit = "Return (XX ()" use function return value
Opener opener.doc ument. Object Control Original open form object

Prompt xx = Window. Prompt ("prompt message", "pre-value"); input statement
Parent. Framework name. Object Control Framework page

Return return false return value
Random random parameter (between 0 and 1)
Reset () form. Reset (); reset the data in the form

Split ("") string. Split ("") Separate String object characters with commas
Submit () form object. Submit () enables the form object to submit data

The charat (x) object of the string object returns the nth Letter of the specified object.
Lastindexof ("string") searches for the specified character from right to left.-1 is not returned.
Indexof ("string"): query the specified character from left to right.-1 is not returned.
Lowercase () converts all objects to lowercase letters
Uppercase () converts all objects to uppercase
Substring () 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 () obtains the time from the X time object, which exists as a string.
Typeof (variable name) checks the type of the variable. The values include string, Boolean, object, function, and underfined.

window. event. button = 1/2/3 left mouse button equals 1 right button equals 2 press 3 together
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 height of the current screen (resolution value)
too many Doc ument. body. offsetheight; returns the current webpage height
window.doc ument. body. offsetwidth; returns the current webpage width
window. resizeTo () set the window width and height
window. moveTo (0, 0) Move the window to a certain position
window. focus () to make the current window focus
window. scroll (x, y) the coordinates of the scroll bar in the window. y controls the up and down movement and must work with the function.
window. open () window. open ("Address", "name", "attribute")
attributes: toolbar (toolbar), location (address bar), ctions, status (status bar ), menubar (menu bar), scrollbar (scroll bar), resizable (change size), width (width), height (height), fullscreen (full screen), scrollbars (no scroll bar in full screen ), channelmode (wide screen), left (Open Window X coordinate), top (open window y coordinate)
window. location = 'view-Source: '+ window. location. view the source code of the web page for href application events.

A = new date (); // create a as a new period object
Y = A. getyear (); // The value of Y is the two-digit year from object.
Y1 = A. getfullyear (); // obtain the four-digit year count
M = A. getmonth (); // obtain the month value.
D = A. getdate (); // obtain the date value
D1 = A. getday (); // obtain the value of the current week
H = A. gethours (); // obtain the current hour
M1 = A. getminutes (); // get the current number of minutes
S = A. getseconds (); // obtain the number of current seconds

Object. style. fontsize = "text size ";
Unit: mm/CM/in inch/PC/PT point/PX pixel/EM text height
1In = 1.25
1 Pc = 12pt
1pt = 1.2px (800*600 resolution)

Text font attributes:
Fontsize
Family font
Color
Fontstyle. The value is normal, italic, and oblique italic and bold.
Fontweight bold, ranging from 100 to 900, 900 rough, light, normal, bold
Letterspacing distance, change the text distance, value: 1pt, 10px, 1 cm
Textdecoration: Text modifier; optional values: None, underline, and overline
Background: Text background color,
Backgroundimage: background image. The value is the insert path of the image.

Click function call trigger on the webpage body:

1. onclick when an object is clicked
2. onload when a webpage is opened, it can only be written in the body
3. onUnload: When a webpage is closed or left, it can only be written in the body.
4. onmouseover when the mouse hangs over it
5. onmouseout when the mouse leaves the object
6. onmouseup when the mouse is released
7. onmousedown when the mouse presses the key
8. onfocus: when the object obtains the focus
9. onselect when the object text is selected
10. onchange when the object content is changed
11. onblur when the object loses focus
Onsubmit = return (SS () value returned when the form is called

Straight Line border-bottom: 1x solid black
Dotted Line border-bottom: 1x dotted black
Dash border-bottom: 2x dashed black
Double Line border-bottom: 5x double black
Slot border-bottom: 1x groove black
Ridge border-bottom: 1x ridge black

1. Glow (color = color, strength = light size)

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

3. Vertical flip flipv (): 180 degrees vertical flip of Objects

4. object fuzzy blur (add = true/false direction = direction strength = intensity)
Add: Specifies whether to perform fuzzy direction based on the impression style; fuzzy direction: strength; fuzzy intensity
5. transparent object alpha (opaction = 0-100, finishopacity = 0-100, style = 0/1/2/3)
Opaction object overall opacity value finishopacity when the object uses the progressive transparency, this specifies the end transparency position opacity value. Style specifies the transparency mode. 0 indicates the overall transparency, 1 indicates the linear transparency, and 2 indicates the circular transparency, 3. rectangular transparency
6. Remove the color chroma (color = color value) to make the color area of the object transparent with the specified color
7. Create a shadow dropshadow (color = shadow color, offx = horizontal deviation from the pixel to the left, offy = horizontal deviation from the pixel)
8. Color-removing gray () enables gray-scale display of Objects
9. Negative Effect invert (): displays negative effects on objects.
10. Highlight light (): displays the object in black.
11. Mask mask (color = color) so that the entire object is masked once in the specified color

Opacity table transparency level. 0 ~ 100, 0 tables are completely transparent, and tables are completely opaque
Gradient transparency to be set in the finishopacity table. 0 ~ 100.
Style table transparent area shape. 0 table uniform shape. 1 Table linear. 2 Table radiology. 3 Table rectangle.
The X and Y coordinates at the beginning of the gradient transparency effect in the startx. starty table.
Coordinates of X and Y at the end of the finishx and finishy gradient transparency effect.
Add to determine whether to make the original target in the blur effect. The value is 0, 1.0 table "no", 1 Table "yes ".
Ction sets the direction of The Blur. 0 degrees the table is vertical up, 45 degrees is a unit. The default value is 270 degrees to the left. Left, right, down, up.
Strength can only be determined by an integer. It indicates that the width of the number of pixels will be blurred. The default value is 5.
The color must be transparent.
Offx and offy are respectively the offsets of shadows in the X and Y directions.
Positive refers to the projection method. 0 table transparent pixel shadow generation. 1 Table only gives opaque pixel shadow generation ..

Addambient: adds a surrounded light source.
Addcone: Add a conical light source.
Addpoint
Changcolor: change the color of light.
Changstrength: changes the intensity of the light source.
Clear: Clear all light sources.
Movelight: mobile light source.

Freq is the ripple frequency. It specifies the number of finished ripple to be generated in the area on the object.
Lightstrength can be used to enhance the effect of ripple-shaped light and shadow ~ 100 positive integer. the start position of the sine wave is 0 ~ Table 0 starts from 0 degrees and Table 25 starts from 90 degrees.
The amplitude of the Strength table.

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-resizestyle = "cursor: Se-resize"
Auto style = "cursor: Auto"

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.