<!DOCTYPE HTML><HTMLLang= "en"OnUnload= "ud ()"><Head> <MetaCharSet= "UTF-8"> <title>Title</title> <Script> functionDemo () {Alert ("Hello"); } functionOnover (ooj) {ooj.innerhtml= "mouse move in display"; } functionOnout (ooj) {ooj.innerhtml= "Mouse out Display"; } functionChangedemo (BG) {alert ("the content has changed .") } functionChangeDemo1 (BG) {Bg.style.background= "Red"; } functionChangeDemo2 (BG) {Bg.style.background= "Blue"; } functionMGs () {Alert ("Content Loading Complete") } functionBU (bg) {varb=Bg.value; Alert ("Mouse Move event (you entered)" +b); } functionud () {alert ("you close the page") } </Script> <style>. Div{width:100px;Height:100px;Background-color:Cadetblue; } </style></Head><Bodyonload= "mgs ()"onunload= "ud ()"><!--Web page load Complete event, Web page Close event (invisible after execution is off) -<Buttononclick= "Demo ()">Button</Button><!--Single Event -<Divclass= "Div"onmouseout= "Onout (this)"onmouseover= "Onover (this)">Start Display</Div><form> <inputtype= "text"onchange= "Changedemo (this)"/> <!--text content Change Event - <inputtype= "text"onselect= "ChangeDemo1 (this)"onfocus= "ChangeDemo2 (this)"/> <!--text content Check Event - <!--Mouse Aggregation (selected) event - <inputtype= "text"onblur= "bu (this)"/> <!--Move Cursor Event event -</form></Body></HTML>
JavaScript Learning Note JS Event first section (original) Reference JS use table