イベントのキャストの30種類!

<!DOCTYPE HTML> 
<HTML LANG = "EN">
<HEAD>
<メタ文字コード= "UTF-8">
<タイトル>タイトル</ TITLE>
</ HEAD>
<BODYのID = "txt16">
の<input type = "テキスト"値= "" ID = "TXT1">
の<input type = "ボタン"値= "点击" ID = "BTN1">
<BR>
<BR>
の<input type = "text"の値= "" ID = "TXT2">
の<input type = "ボタン"値= "双击" ID = "BTN2">
<BR>
<BR>
の<input type = "text"の値= "" ID = "txt3">
の<input type =」ボタン」値= 『按下』ID = "btn3">
<BR>
<BR>
の<input type = "text"の値= "" ID = "txt4">
の<input type = "ボタン"値= "抬起" ID = "btn4">
<BR >
<BR>
の<input type = "text"の値= "" ID = "txt5">
<input type = "ボタン"値= "进入" ID = "btn5">
<BR>
<BR>
の<input type = "text"の値= "" ID = "txt6">
の<input type = "ボタン"値= "离开" ID = "btn6">
<BR>
<BR>
の<input type = "text"の値= "" ID = "txt7">
の<input type = "ボタン"値= "移动" ID = "btn7">
<BR>
<BR>
<! -の<input type = "text"値= "" ID = "txt8"> - >
<H2>键盘控制:</ H2>
の<input type = "text" NAME =」 "クラス="テキスト"ID = "DIV7"プレースホルダ= "按下" STYLE ="背景色:赤、幅100ピクセル、高さは50px; ">
<BR>
<BR>
の<input type =" text "の名= ""クラス= "テキスト" ID = "DIV8"プレースホルダ= "抬起" STYLE ="バックグラウンド色:赤;幅:100ピクセル、高さは50px; ">
<BR>
<BR>
<input type = "text"の名= ""クラス= "テキスト" ID = "div9"プレースホルダ= "抬起" STYLE = "背景色:赤、幅100ピクセル、高さは50px;">

<H2>表单控件</ H2>
<フォームアクション= "">
の<input type = "text"のプレースホルダ= "失去焦点"値= "" ID = "txt10">
<BR>
<BR>
の<input type = "text"のプレースホルダ= "获取焦点"値= "" ID = "txt11">
<BR>
<BR>
の<input type = "text"のプレースホルダ= "输入时、看控制台"値= "" ID = "txt12">
<BR >
<BR>
の<input type = "text"の値=」コンソールを見て"ID ="変更txt13 ">
<BR>
<BR>
<タイプ=のINPUT"あなたはリセットRESET "値="ルックコンソール"ID =" txt14「>
<BR>
<BR>
<タイプのINPUTを=値= "コンソールが表示さ提出する" "提出" ID = "txt15">
</フォーム>
</ BODY>
<SCRIPT>
VAR oTxt1 =のdocument.getElementById( "TXT1")
VAR oBtn1 =のdocument.getElementById( "BTN1")
oBtn1.onclick =関数(){
oTxt1.value = "点击一下"
はconsole.log(」点击一下")
}
VAR oTxt2 =のdocument.getElementById(" TXT2 ")
VAR oBtn2 =のdocument.getElementById(" BTN2 ")
oBtn2.ondblclick =関数(){
oTxt2.value ="双击一下"
はconsole.log("双击一下")
}
VAR oTxt3 =のdocument.getElementById(" txt3 ")
VAR oBtn3 =のdocument.getElementById(" btn3 ")
oBtn3.onmousedown =関数(){
oTxt3.value ="按下」
console.log( "プレス")
}
VAR oTxt4 =のdocument.getElementById( "txt4")
VAR oBtn4 =のdocument.getElementById( "btn4")
oBtn4.onmouseup =関数(){
oTxt4.value = "抬起"
はconsole.log( "抬起")
}
VAR oTxt5 =のdocument.getElementById( "txt5")
VAR oBtn5 =のdocument.getElementById( "btn5")
oBtn5.onmouseover =関数(){
oTxt5.value = "进入"
はconsole.log( "进入")
}
VAR oTxt6 =のdocument.getElementById ( "txt6")
VAR oBtn6 =のdocument.getElementById( "btn6")
oBtn6.onmouseout =関数(){
oTxt6.value = "离开"
はconsole.log( "离开")
}
VAR oTxt7 =のdocument.getElementById( "txt7")
document.getElementById oBtn7 = VAR( "btn7")
oBtn7.onmousemove =関数(){
oTxt7.value = "移動"
はconsole.log( "モバイル")
}
// VAR oTxt8 =のdocument.getElementById( "txt8")
// document.getElementById oBtn8 = VAR( "btn7")
// oBtn8.onkeydown =関数(){
//はconsole.log( "プレストリガー効果")
//}
// div7.onkeydown =関数(){
// console.log( "プレストリガー効果")
//}
VAR DIV7 =のdocument.getElementById( "DIV7")
div7.onkeydown =関数(){
div7.value = "プレストリガー効果"
はconsole.log( "トリガー効果を押した後「)
}
VAR = DIV8文献。getElementByIdを( "DIV8")
div8.onkeyup =関数(){
console.log( "エフェクトを持ち上げた後にトリガ")
div8.value = "効果を持ち上げ後にトリガ"
}
VAR div9 =のdocument.getElementById( "div9")
div9.onkeypress =関数(){
にconsole.log(「プレスそして")トリガー効果を持ち上げ
div9.value ="プレスをトリガ効果を持ち上げる"
}
VAR oTxt10 =のdocument.getElementById(" txt10 ")
oTxt10.onblur =関数(){
にconsole.log("「フォーカスを失う)
oTxt10 .VALUE = "焦点を失う"
}
VAR oTxt11 =のdocument.getElementById( "txt11")
oTxt11.onfocus =関数(){
にconsole.log( "フォーカスを取得")
oTxt11.value = "フォーカスを取得"
}
VAR = oTxt12文献。 getElementByIdを( "txt12" )
oTxt12.oninput =関数(){
console.log( "入力された")
// oTxt12.value = "フォーカスを取得"
}
VAR oTxt13 =のdocument.getElementById( "txt13")
oTxt13.onchange =関数(){
にconsole.log( "修飾されました")
/ / oTxt12.value = "フォーカスを取得"
}
VAR oTxt14 =のdocument.getElementById( "txt14")
oTxt14.onreset =関数(){
にconsole.log( "正常リセット")
oTxt12.value = "取得フォーカス"
}
VAR oTxt15 document.getElementById =( "txt15")
oTxt15.onsubmit =関数(){
にconsole.log( "成功コミット")
oTxt12.valueは= "フォーカスを取得"
}
VAR負荷=のdocument.getElementById( "txt16")
Load.onload =関数(){
にconsole.log( "ページがロード")
}
// VAR =スクロールのdocument.write( "txt16")
// scroll.onscroll =関数(){
//はconsole.log( "ページがスクロールしている")
//} を行っていない
// varがリサイズ=のdocument.write ( "txt16")
// resize.onresize =関数(){
//はconsole.log( "ページが狭くされている")
//} それせずに
</ SCRIPT>
</ HTML>

おすすめ

転載: www.cnblogs.com/hy96/p/11375250.html