亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

我的第一個(gè)js事件

Original 2019-06-22 21:38:13 218
abstract:<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>事件</title><style type="text/css&q

<!DOCTYPE html>

<html>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>事件</title>

<style type="text/css">

.q{

width:100px;

height:100px;

border:1px solid #ccc;

}

.w{

width:100px;

height:100px;

border:1px solid #ccc;

}

.e{

width:100px;

height:100px;

border:1px solid #ccc;

}

</style>

</head>


<body>

<script type="text/jscript">

function bs(x){

x.style.background="pink"

x.style.borderRadius="50px"

}

</script>


<div class="q" onclick="bs(this)"></div>

<br />

<br />

<br />

<div class="w" onmouseover="bs(this)"> </div>

</body>

</html>


Correcting teacher:天蓬老師Correction time:2019-06-24 10:09:20
Teacher's summary:將事件能屬性的方式添加到元素上, 是最古老的,也是最直觀有效的方式之一.... 不過(guò), 要注意, 事件名稱,只有當(dāng)成元素屬性的時(shí)候, 才需要添加前綴: on, 其它情況下不要添加的

Release Notes

Popular Entries