How to trigger a javascript double-click event

Source: Internet
Author: User
Tags html comment

Javascript event list explanation
Event browser support explanation
This event is triggered when an onclick ie3 or N2 mouse is clicked.
This event is triggered when you double-click an ondblclick ie4 or N4 mouse.
Onmousedown ie4 and N4 trigger this event when you press the mouse
This event is triggered when onmouseup ie4 and N4 are clicked and the mouse is released.
Onmouseover ie3 and N2 trigger this event when you move the mouse over an object range
This event is triggered when the onmousemove ie4 and N4 are moved.
Onmouseout ie4 and N3 trigger this event when the mouse leaves a certain object range
Onkeypress ie4 and N4 trigger this event when a key on the keyboard is pressed and released.
Onkeydown ie4, N4 this event is triggered when a key on the keyboard is pressed
Onkeyup ie4, N4 this event is triggered when a button on the keyboard is pressed and opened
Page-related events onabort ie4 and N3 images are interrupted by users during download
Onbeforeunload ie4, n this event is triggered when the content of the current page is about to be changed
This event is triggered when an error occurs in onerror ie4 and N3.
This event is triggered when the onload ie3 and N2 page content is complete.
This event is triggered when the windows of the onmove IE and N4 browsers are moved.
Onresize ie4 and N4 trigger this event when the browser's window size is changed
This event is triggered when the position of the onscroll ie4 or N browser's scroll bar changes.
This event is triggered when the stop button of the onstop ie5 or N browser is pressed or the file being downloaded is interrupted.
This event is triggered when the current page of onUnload ie3 and N2 is changed.
This event is triggered when the current onblur ie3 and N2 elements lose focus.
Onchange ie3, N2: this event is triggered when the current element loses focus and the content of the element changes.
Onfocus ie3 and N2 trigger this event when an element obtains focus
Onreset ie4, N3 this event is triggered when the reset attribute in the form is fired
This event is triggered when an onsubmit ie3 or N2 form is submitted.
This event is triggered when the onbounce ie4 and N content in marquee is moved out of the marquee display range.
Onfinish ie4, n this event is triggered when the marquee element completes the content to be displayed
Onstart ie4, n this event is triggered when the marquee element begins to display content
Edit event onbeforecopy ie5 and N trigger this event when the selected content on the page is to be copied to the clipboard of the browser System
Onbeforecut ie5, n this event is triggered when part or all of the content on the page is removed from the current page [clipboard] and moved to the browser's system clipboard
Onbeforeeditfocus ie5, n the current element will enter the editing status
This event is triggered when onbeforepaste ie5 and N content is to be transferred [pasted] to the page from the browser's system clipboard
Onbeforeupdate ie5 and N notify the target object when the viewer pastes the content in the system clipboard.
Oncontextmenu ie5 and N events triggered when the viewer presses the right-click menu to display the event or triggers the page menu by pressing the keyboard button
Oncopy ie5, n this event is triggered when the selected content on the page is copied
Oncut ie5, n this event is triggered when the selected content on the page is cut
Ondrag ie5 and N: this event is triggered when an object is dragged. [activity event]
Ondragdrop IE, N4 an external object is dragged into the current window or frame by the mouse
Ondragend ie5, n this event is triggered when the mouse drag ends, that is, the mouse button is released
Ondragenter ie5, n this event is triggered when the object is dragged by the mouse into its container range
Ondragleave ie5, n this event is triggered when the object is dragged by the mouse out of its container range
Ondragover ie5, n this event is triggered when a dragged object is dragged within the range of another object container
Ondragstart ie4, n this event is triggered when an object is dragged
Ondrop ie5 and N trigger this event when the mouse key is released during a drag process
Onlosecapture ie5, n this event is triggered when the selection focus formed by the element's mouse movement is lost
Onpaste ie5 and N trigger this event when the content is pasted
Onselect ie4, N event when text content is selected
Onselectstart ie4 and N events triggered when the text content is selected
Data Binding onafterupdate ie4 and N trigger this event when data is transferred from the data source to the object
Oncellchange ie5 and N when the data source changes
Ondataavailable ie4 and N trigger an event when data reception is complete
Ondatasetchanged ie4 and N events triggered when data sources change
Ondatasetcomplete ie4 and n this event is triggered when all valid data of the sub-data source is read.
Onerrorupdate ie4 and N Replace the onafterupdate event when the onbeforeupdate event is triggered to cancel Data Transmission
Onrowenter ie5, N events triggered when the data in the current data source changes and new valid data exists
Onrowexit ie5 and N events triggered when the data in the current data source is about to change
This event is triggered when the onrowsdelete ie5 and N current data records are deleted.
Onrowsinserted ie5 and n this event is triggered when the current data source is about to insert a new data record
External event onafterprint ie5, n this event is triggered when the document is printed
Onbeforeprint ie5, n this event is triggered when the document is about to be printed
Onfilterchange ie4, N events triggered when the filter effect of an object changes
Onhelp ie4, n this event is triggered when the viewer presses F1 or the browser's help Selection
Onpropertychange ie5, n this event is triggered when one of the object's properties Changes
Onreadystatechange ie4, n this event is triggered when the object's initialization property value changes

Events that can be used by JavaScript

Javascript is a client scripting language that works with htmlhtml. However, this is not a javsscript guide. We focus on how to use JavaScript in HTML.
Javascript events are used like HTML tag attributes. An event is a behavior that occurs on an HTML element, such as when it is clicked or when it loses focus.
<A href = "# Top" onclick = "alert ('Wow. Javascript. ')"> click me </a>
The following events can be used:
Onblur (used in form elements, executed when the element loses focus)
Onchange (used in form elements, when something changes, it is executed)
Onclick (execute when you click an element)
Ondblclick (executed when you double-click an element)
Onfocus (used in form elements and executed when the element gets Focus)
Onkeydown (executed when a key is pressed)
Onkeypress (executed when a key is pressed and released)
Onkeyup (executed when a key is released)
Onload (used in the body label and executed when loading the page)
Onmousedown (executed when you press the mouse button)
Onmousemove (executed when the cursor moves over the element)
Onmouseout (executed when the mouse moves the element away)
Onmouseover (executed when the mouse cursor moves over the element)
Onmouseup (executed when the mouse button is released)
Onreset (used in form elements and executed when the form is reset)
Onselect (used in form elements, executed when an element is selected)
Onsubmit (used in form elements and executed when the form is submitted)
OnUnload (used in the body label and executed when the page is closed)
Do not lose self-control over JavaScript. It is best to use less. A web page using JavaScript has the risk of significantly reducing ease of use, and many things can replace it, such as the server-side scripting language PHP or ASP.
Bytes ------------------------------------------------------------------------------------------

Dom Programming

1javascript uses the browser itself, webpage documents, and HTML elements in Webpage documents to express them with the corresponding built-in ones that you like, the hierarchical relationships between these objects are collectively referred to as Dom (Document Object Model, Document Object Model)
DHTML
2
The combination of CSS, scripting language, and Dom enables interaction and dynamic transformation between HTML documents and users. The single title of these three technologies is DHTML (Dynamic HTML, dynamic HTML)

Prohibit right-clicking in the browser to open the menu code
<HTML>
<Head>
<Script language = "JavaScript">
<! --
Function hidecontestmenu ()
{
Window. event. returnvalue = false;
}
// --> To prevent other browsers from using the HTML comment end mark as the javascrip program code
</SCRIPT>
<Head>
<Body oncontextmenu = "Return false;/* hidecontextmenu () */">
</Html>

2. directly set the event attribute of the Element Object in JavaScript code, so that the event property value is equal to the function name or program code that processes the event, and the execution is interpreted to generate an error.
<Script language = "JavaScript">
Document. oncontextmenu = hidecontextmenu;
Function hidecontestmenu ()
{
Return false;
}
</SCRIPT>
3. Compile an event handler code for an element object in a special <SCRIPT> tag pair and use the for attribute to specify the event source and the event attribute to specify the event name.
<Script language = "JavaScript" for = "document" event = "oncontextmenu">
Windows. event. returnvalue = false;
</SCRIPT>

Windows objects
1. Windows objects represent the entire window of the browser. programmers can use Windows objects to control all aspects of the browser window,

Windows Object -- Method
1. Alert
2. Confirm
3. the prompt displays
4. Navigate to other pages
5. setinterval: Set how long the browser regularly calls and executes the specified code.
6. setTimeout: Set the browser to execute the Specified Code after a long time
7. clearinterval method, used to cancel setinterval settings
8. cleartimeout cancel setTimeout
9. moveTo move the browser to a location in the browser
10. resizeTo change the browser window size
11. The open method is used to open a new window,
12. showmodaldialog method, used to generate a modal dialog box window
13. showmodelessdialog method, used to generate a non-modal dialog box window

This article from the csdn blog, reproduced please indicate the source: http://blog.csdn.net/helanye/archive/2009/07/09/4335986.aspx

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.