JS Windows object

Source: Internet
Author: User
One, DOM operations Windows object Operations Document object operations two, properties, Event 1, Window Properties: window.shuxing (property) Window.fangfa () (method) method followed by parentheses. 2, the event is made into a function, and so on to meet certain conditions before triggering. Example: Add a click event. <body> <div style= "width:100px;  height:100px; </div> </body><script type= "Text/javascript" > event code to be executed by Div encapsulates function Tishi () {alert ("I was clicked")}< /script> Common elements: ①oncilck: Click ②ondblcilck: Double-tap ③onkeydown: Press the button to start ④onkeypress: Press the button on the departure ⑤onkeyup: Lift up the departure ⑥onmoussdown: Mouse click ⑦onmousmove: Mouse movement ⑧onmousout: Mouse move out of the ⑨onmousover: mouse over the ⑩onmousup: the moment the mouse lifted the special event (put into the form element inside use) ①onblur: Out of focus ②onchange: The time to change ③onfocus: Get focus ④onselcet: Delegate Select this: represents the element itself. Event: There are generally two parameters. Example: Load (sender,e) has such two parameters. Sender: Represents the event source. That is, who triggered the event. E: Represents the event data. The event is a special delegate. (agent) Window.opener: Open source. Window.setinter

JS Windows object

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.