The event occurs immediately after the page or image is loaded.HTML tags that support the event:, , , , , , Pop-up box after loading HTML Dom Event Object onload event
event occurs when the keyboard key is pressed and a key is released. Browser differences: IE uses Event.keycode to retrieve the characters that are pressed, while Netscape/firefox/opera uses Event.which.HTML tags that support the event:, , , , , , ,
One, the print controlThe first step is to get the print object out first.-PrintDocument the printed object (the content that will be printed is placed in the object, and the content is printed from that object)set his PrintPage event (fires once
A Event ObjectEvent handling consists of three parts: an object. The event handler function = function. For example, click anywhere in the document.1. mouse buttonButton properties in non-IE (Internet Explorer)0 indicates the primary mouse button
DOM event object attributes and methods, domevent object
Attribute/Method
Type
Read/write?
Description
AltKey
Boolean
Read/write
Indicates whether to press the alt key
Bubbles
Boolean
Read
After you click the hyperlink "set as primary entity", the original prompt box will change color and the content will be displayed: "already set as merged primary entity ".
Problem: when there is another hot zone B under the hyperlink in the prompt
HTML Dom Event object onload Event, domonload
An event occurs immediately after the page or image is loaded.
HTML tags that support this event:, , , , , , A dialog box is displayed after loading.
To determine the element that triggered the event:var tag = Window.event.target | | Window.event.srcElement;if (tag.tagName.toLowerCase () = = "Input") {Return}Window.event.srcElement and Window.event.target are all elements that point to the
To determine the element that triggered the event:var tag = Window.event.target | | Window.event.srcElement;if (tag.tagName.toLowerCase () = = "Input") {Return}Window.event.srcElement and Window.event.target are all elements that point to the
Sometimes the code is handy, and you use anonymous stuff.1. Anonymous EventsArgs. Cookiegot + = (s, e) = ={This. Isweblogon = true;};Do not write the method specifically, of course, this way of introduction to use.2. Anonymous objectsvar ohlist =
First decide to investigate the event returned by the input and change eventsContent returned by inputEvent {istrusted:true, type: "Input", Target:input#user, Currenttarget:input#user, Eventphase:2 ...}The Change event does not return after you
Sometimes the project will not use jquery as such a good framework, you need to encapsulate some event objects and event handlers, such as encapsulating Ajax;This is the most considered browser compatibility issues, the native JS package is as
E. stopPropagation () prevents event bubbles
The Code is as follows:
bubble event test
Let's first look at this Code:
The Code is as follows:
We can see the following situation: span alert-> td alert-> table alert. This is called
Location Properties: Host: Returns the current host name and port number Timer function: SetTimeout () setinterval () Second, Document Object getElementById (); Gets a DOM object based on the ID value getelementsbyname (); Gets multiple DOM
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.