abstrait:<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>index</title></head><body > <div >  
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
</head>
<body >
<div >
<div style="float: right;margin-right: 25px">
<img src="./img/微信圖片.jpg" name="pic" >
</div>
<div style="float: right;">
<form action="" name="register">
<input type="text" placeholder="用戶(hù)名" ><br>
<input type="password" placeholder="密碼不少于8位" ><br>
<button>提交</button>
</form>
</div>
</div>
<script type="text/javascript">
//通過(guò)class獲取元素
let info= document.getElementsByClassName('info').item(0);
info.style.backgroundColor='black';
info.style.width='100%';
info.style.height='200px';
//通過(guò)name獲取元素
let pic=document.getElementsByName('pic').item(0);
pic.style.width='200px'
//通過(guò)標(biāo)簽名和name來(lái)獲取元素
document.images[0].style.height="200px";
//通過(guò)css選擇器來(lái)獲取元素
let input=document.querySelectorAll('input');
for(let i=0;i<input.length;i++){
input[i].style.marginRight='25px';
input[i].style.marginTop='15px';
input[i].style.width='200px';
input[i].style.height='25px';}
</script>
</body>
</html>
Professeur correcteur:天蓬老師Temps de correction:2018-12-17 15:25:35
Résumé du professeur:好吧, 相信你, 下一次 ,作業(yè)會(huì)更好