In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly shows you the "sample analysis of javascript event query", which is easy to understand and clear. I hope it can help you solve your doubts. Let the editor lead you to study and study the "sample analysis of javascript event query".
The click () object. Click () causes the object to be clicked.
Whether the closed object window has closed true/false or not
ClearTimeout (object) clears the set setTimeout object
ClearInterval (object) clears the set setInterval object
Confirm ("prompt message") pops up the confirmation box to make sure to return to true and cancel returning to 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 Y coordinate value of the last mouse click
Event.offsetX returns the current mouse hover X coordinate value
Event.offsetY returns the current mouse hover Y coordinate value
[xss_clean] (document.lastModified) the last time the page was updated
_ document.ondblclick=x when double-clicking the mouse generates an event
_ document.onmousedown=x clicks the mouse button to generate an event
Document.body.scrollTop; returns and sets the coordinate values of the current vertical scroll bar, which must be matched with the function
Document.body.scrollLeft; returns and sets the coordinate values of the current horizontal rolling operation, which must be coordinated with the function.
Document.title document.title= "message"; title bar text of the current window
Document.bgcolor document.bgcolor= "color value"; change the window background color
Document.Fgcolor document.Fgcolor= "color value"; change the body color
Document.linkcolor document.linkcolor= "color value"; change the hyperjoin color
Document.alinkcolor document.alinkcolor= "color value"; change the color of the positive click connection
Document.VlinkColor document.VlinkColor= "color value"; change the color of the accessed join
Document.forms.length returns the number of form forms on the current page
Document.anchors.length returns the number of current page anchors
Document.links.length returns the number of current page joins
_ document.onmousedown=x mouse click triggers event
_ document.ondblclick=x double-click mouse trigger event
DefaultStatus window.status=defaultStatus; sets the status bar to display by default
Function function xx () {...} defines a function
IsNumeric determines whether it is a number or not
InnerHTML xx= object [xss_clean] enter the html source code in an object label
InnerText divid.innerText=xx sets the value of the object anchored with div and named with id to XX
Location.reload (); to refresh this page, target can be equal to a refreshed web page
The random number of Math.random () can only be a number between 0 and 1. If you want to get other numbers, it can be * 10, and then rounded.
Math.floor (number) converts the object number to an integer, rounding off all decimals
Math.min (1Magazine 2) returns 1Magne2 which is smaller
Math.max (1BI 2) returns 1BI 2 which is bigger
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 flag
Onsubmit returns a value using a function
Opener opener.document. Object controls the original opening of the form object
Prompt xx=window.prompt ("prompt", "predetermined value"); input statement
Parent parent. Frame name. Object control frame page
Return return false return value
Random random parameter (between 0 and 1)
Reset () form.reset (); reset the data in the form form
Split (") string.split (") separates string object characters with commas
Submit () form object .submit () causes the form object to submit data
The charAt (x) object of the String object returns the letter of the specified object
LastIndexOf ("string") asks for the specified character from right to left and does not return-1
IndexOf ("string") queries from left to right for the specified character and does not return-1
LowerCase () converts all objects to lowercase
UpperCase () converts all objects to uppercase
Substring (0mem5) string.substring (xmemx) returns 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 and exists as a string
Typeof (variable name) checks the type of variable. The values are: String,Boolean,Object,Function,Underfined
Window.event.button==1/2/3 mouse button left button equals 1 right key equals 2 two keys press 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 height of the current page
Window.document.body.offsetWidth; returns the current page width
Document.body.clientWidth returns browser width
Document.body.clientHeight returns browser height
Window.resizeTo sets the width and height of the window
Window.moveTo (zero zero) moves the window to a location
Window.focus () gives focus to the current window
Window.scroll window scroll bar coordinates, y control up and down movement, must cooperate with the function
Window.open () window.open (address, name, attribute)
Properties: toolbar (toolbar), location (address bar), directions,status (status bar)
Menubar (menu bar), scrollbar (scroll bar), resizable (resize), width (wide), height (high), fullscreen (full screen), scrollbars (no scroll bar and no parameters when full screen, channelmode (wide screen), left (open window x coordinates), top (open window y coordinates)
_ window.location = 'view-source:' + _ window.location.href Application event View the source code of the web page
A=new Date (); / / create an as a new period object
The value of y=a.getYear (); / / y is to get the year value from the object a, a double-digit year
Y1=a.getFullYear (); / / get the annual share four-digit year
M=a.getMonth (); / / get the month value
D=a.getDate (); / / get the date value
D1=a.getDay (); / / get the current week value
H=a.getHours (); / / get the current hours
M1=a.getMinutes (); / / get the current number of minutes
S=a.getSeconds (); / / get the current number of seconds
Click the body function of the web page to call the trigger:
1.onClick when the object is clicked
2.onLoad when a web page is opened, it can only be written in body
3.onUnload can only be written in body when a web page is closed or left
4.onmouseover when the mouse hovers over it
5.onmouseout when the mouse leaves the object
6.onmouseup when the mouse is released
7.onmousedown when the mouse button is pressed
8.onFocus when an object gets focus
9.onSelect when the text of the object is selected
10.onChange when the content of an object is changed
11.onBlur when an object loses focus [@ more@]
The above is all the content of the article "sample Analysis of javascript event query". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.