abstrakt:<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Document</title> <style> .example{widt
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Document</title>
<style>
.example{width: 300px;height: 200px;border: 1px solid #ccc;background: lightcoral;color:#fff;text-align: center;line-height: 200px; }
#hello{background: chartreuse;width: 300px;height: 200px;}
</style>
</head>
<body>
<div id="hello" onclick="two(this)"></div>
<div></div>
<div></div>
<button onclick="myFunction()">點擊</button>
<script>
function myFunction() {
var x = document.getElementsByClassName("example");
x[0].innerHTML = "花開花落花無悔!";
x[1].innerHTML = "緣來緣去緣如水!";
}
function two(y){
var li =document.getElementById("hello");
li.style="background:red;width:500px;height:500px;border-radius: 50%;";
}
</script>
</body>
</html>
Korrigierender Lehrer:韋小寶Korrekturzeit:2019-02-01 09:45:28
Zusammenfassung des Lehrers:寫的很不錯 這種就是要多練習(xí)才可以熟練的掌握 繼續(xù)加油吧!