Trigger Event encyclopedia when JavaScript mouse double-clicks

Source: Internet
Author: User
Tags html comment

JavaScript Event List Commentary
Event Browser Support Commentary
General event onclick IE3, N2 trigger this event when mouse clicks
OnDblClick IE4, N4 triggers this event when the mouse double-clicks
OnMouseDown IE4, N4 triggers this event when the mouse is pressed
OnMouseUp IE4, N4 triggers this event when you release the mouse when the mouse is pressed
onmouseover IE3, N2 triggers this event when the mouse moves over the range of an object
OnMouseMove IE4, N4 triggers this event when the mouse moves
onmouseout IE4, N3 triggers this event when the mouse leaves an object range
onkeypress IE4, N4 triggers this event when a key on the keyboard is pressed and released.
OnKeyDown IE4, N4 triggers this event when a key on the keyboard is pressed
OnKeyUp IE4, N4 triggers this event when a key on the keyboard is pressed to release
Page-related events onabort IE4, N3 images are interrupted by the user when downloading
onBeforeUnload IE4, N triggers this event when the contents of the current page are about to be changed
This event is triggered when an error occurs onerror IE4, N3
This event is triggered when the onload IE3, N2 page content finishes
This event is triggered when the window of OnMove IE, N4 browser is moved
OnResize IE4, N4 triggers this event when the browser's window size is changed
This event is triggered when the scroll bar position of the onscroll IE4, N browser is changed
OnStop IE5, N the browser's stop button is pressed when this event is triggered or the file being downloaded is interrupted
OnUnload IE3, N2 the current page will be changed when this event is triggered
This event is triggered when a form-related event onblur IE3, N2 the current element loses focus
OnChange IE3, N2 the current element loses focus and the element's content changes to trigger this event
onfocus IE3, N2 triggers this event when an element receives focus
OnReset IE4, N3 This event is triggered when the properties of reset in the form are fired
OnSubmit IE3, N2 This event is triggered when a form is submitted
This event is triggered when scrolling caption event onbounce IE4, N moves beyond the marquee display to the content within the marquee
OnFinish IE4, N fires this event when the MARQUEE element finishes what needs to be displayed
OnStart IE4, N fires this event when the MARQUEE element starts displaying content
Edit Event Onbeforecopy IE5, N triggers this event before the current selection of the page will be copied to the Clipboard of the viewer system
Onbeforecut IE5, N triggers this event when some or all of the contents of a page are moved away from the current page [clip] and moved to the viewer's system Clipboard
Onbeforeeditfocus IE5, N current element will enter edit state
This event is triggered when Onbeforepaste IE5, N content is going to be transferred from the viewer's system Clipboard [paste] to the page
onbeforeupdate IE5, N notifies the target object when the viewer pastes the contents of the system Clipboard
OnContextMenu IE5, N events triggered when the viewer presses the right mouse button to the menu, or when the page menu is triggered by a keyboard key
Oncopy IE5, N triggers this event when the current selected content of the page is copied
Oncut IE5, N triggers this event when the current selected content of the page is clipped
Ondrag IE5, N fires this event when an object is dragged [active event]
Ondragdrop IE, N4 an external object is dragged into the current window or frame by the mouse
Ondragend IE5, N triggers this event when the mouse drag is finished, that is, the mouse button is released
OnDragEnter IE5, N fires this event when an object is dragged into its container by an object that the mouse drags
OnDragLeave IE5, N fires this event when an object is dragged out of its container by an object that the mouse drags
OnDragOver IE5, N fires this event when a dragged object is dragged within the scope of another object container
Ondragstart IE4, N fires this event when an object is being dragged
OnDrop IE5, N triggers this event when the mouse button is released during a drag
Onlosecapture IE5, N triggers this event when the element loses the selection focus formed by the mouse movement
Onpaste IE5, N triggers this event when content is pasted
Onselect IE4, N events When text content is selected
Onselectstart IE4, N events triggered when text content selection will begin to occur
Data binding onafterupdate IE4, N triggers this event when data is completed by the data source to the object's transfer
Oncellchange IE5, N when the data source is changed
ondataavailable IE4, N triggers an event when data reception is complete
ondatasetchanged IE4, N events triggered when the data source has changed
ondatasetcomplete IE4, N triggers this event when all valid data for the child data source has been read
onerrorupdate IE4, N replaces onafterupdate event when data transfer is canceled with onbeforeupdate Event trigger
Onrowenter IE5, N events that are triggered when data from the current data source changes and there are new valid data
onrowexit IE5, N events that are triggered when data from the current data source is going to change
Onrowsdelete IE5, N triggers this event when the current data record is deleted
Onrowsinserted IE5, N fires this event when the current data source is about to insert a new data record
External event Onafterprint IE5, N triggers this event when the document is printed
Onbeforeprint IE5, N triggers this event when the document is about to be printed
Onfilterchange IE4, N events that are triggered when the filter effect of an object changes
OnHelp IE4, N triggers this event when the viewer presses F1 or the browser's help is selected
Onpropertychange IE5, N fires this event when one of the properties of an object has changed
onReadyStateChange IE4, N fires this event when the initialization property value of an object has changed

Events that JavaScript can use

JavaScript is a client-side scripting language that works with htmlhtml, but this is not a javsscript guide, and we look at how JavaScript is used in HTML.
JavaScript events are used as attributes of HTML tags. Events are some of the behaviors that occur on HTML elements, such as when they were clicked or when they lost focus.
<a href= "#top" onclick= "alert (' Wow. Javascript. ') ' >click me</a>
The events that can be used are:
onblur (used in form elements, executed when the element loses focus)
onchange (used in form elements, when something changes is performed)
OnClick (executed when mouse clicks on an element)
OnDblClick (executes when the mouse double-clicks an element)
onfocus (used in form elements, executed when the element receives focus)
OnKeyDown (performed when a key is pressed)
onkeypress (performed when a key is pressed and released)
OnKeyUp (performed when a key is released)
OnLoad (for use in body tag, loading page when executing)
OnMouseDown (performed when the mouse button is pressed)
OnMouseMove (executes when the mouse cursor moves over the element)
onMouseOut (executes when the mouse cursor moves the element away)
onMouseOver (executes when the mouse cursor moves over the element)
OnMouseUp (performed when the mouse button is released)
OnReset (used in form elements when the form is reset)
Onselect (used in form elements, executed when element is selected)
OnSubmit (used in form elements when the form is submitted for execution)
OnUnload (used in the body tag when the page is closed)
Don't lose self-control over JavaScript. It's better to use less. A Web page that uses JavaScript has the risk of severely reducing ease of use, and many things can replace it, such as a server-side scripting language such as PHP or ASP.
------------------------------------------------------------------------------------------

DOM Programming

1JAVASCRIPT The browser itself, the Web document, and the HTML elements in the Web document, and so on, with the corresponding built-in to the favorite, the hierarchy between the objects and the system is called DOM
Dhtml
2
CSS, scripting languages and the use of the DOM, can make HTML documents and users interactive and dynamic transformation, the single name of the three technologies called DHTML (Dynamic HTML, dynamics HTML)

Disable the right mouse button to open the menu code in the browser
<script language= "JavaScript" >
<!--
function Hidecontestmenu ()
{
Window.event.returnvalue=false;
}
--to prevent other browsers from having HTML comment closing tags as Javascrip program code
</script>
<body oncontextmenu= "Return False;/*hidecontextmenu () */" >

2 directly in JavaScript code, set the event property of an Element object, and let the event property value equal to the function name or program code that handles the event, interpreting execution to produce an error
<script language= "JavaScript" >
Document.oncontextmenu=hidecontextmenu;
function Hidecontestmenu ()
{
return false;
}
</script>
3 Write some event handler code for an element object in a dedicated <script> tag pair, specify the event source with the For property, and specify the event name with the events property
<script language= "javascript" for= "document" event= "OnContextMenu" >
Windows.event.returnvalue=false;
</script>


Windows objects
The 1windows object represents the entire window of the browser, and the programmer can take advantage of the Windows object to control all aspects of the browser window,

Windows objects--Methods
1.alert
2.confirm
3.prompt shows one can
4.navigate navigating to content on another page
5.setInterval set Browser every too long to periodically invoke execution of the specified code
6.setTimeout setting the browser for too long to execute the specified code
7.clearInterval method for canceling setinterval settings
8.clearTimeout Cancel SetTimeout
9.moveTo move your browser to a location in your browser
10.resizeTo changing the size of the browser window
The 11.open method is used to open a new window,
12.showModalDialog method for generating a modal dialog window
13.showModelessDialog method for generating a non-modal dialog window

Trigger Event encyclopedia when JavaScript mouse double-clicks

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.