abstrakt:<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>js事件</title> </head> <script type="text/javascript"> func
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>js事件</title> </head> <script type="text/javascript"> function fun(){ alert("請輸入名字") } function content(){ alert("登陸中。。") } function change(x){ x.style.borderRadius="5px" } </script> <body onload="content()"> 姓名:<input type="text" placeholder="請輸入名字" onmouseout="fun()"> <input type="submit" value="輸入" onclick="change(this)"> </body> </html> 獲取屬性得時(shí)候使用駝峰式寫法: x.style.borderRadius="5px"; onclick 當(dāng)用戶點(diǎn)擊鼠標(biāo)時(shí); onload 一張頁面或一幅圖像完成加載; onkeyup 某個(gè)鍵盤按鍵被按開; onmouseout 鼠標(biāo)從某元素移開 onfocus 元素獲得焦點(diǎn); onblur 元素失去焦點(diǎn); ...
Korrigierender Lehrer:滅絕師太Korrekturzeit:2018-11-24 09:12:25
Zusammenfassung des Lehrers:事件方法要好好測試一下奧,把學(xué)習(xí)的知識點(diǎn)用到案例中才是王道!