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