abstrak:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
li{list-style: none;}
ul{font-size:20px;}
a{text-decoration: none; }
</style>
</head>
<body>
<div class="top1">
<ul id='ul1' >
<li class="li1" >我們是共產(chǎn)主義接班人</li>
<li >我是西藏人</li>
<li >我是中國(guó)人</li>
<li>我愛(ài)我的祖國(guó)</li>
</ul>
</div>
<div class="top2">
<img src="../zuoye/11.jpg" name="pic">
<form acction='' name='biao'>
<input type='text' name='text' placeholder="用戶(hù)名輸入">
<input type="password" name="pwd" class="pwd" placeholder="八位密碼">
<button>提交</button>
<br>
</form>
<a href="" name='php' id="php">我是一個(gè)鏈接標(biāo)簽</a>
</div>
</body>
</html>
<script>
document.getElementById('ul1').style.backgroundColor="pink";
document.getElementsByTagName('li')[1].style.backgroundColor="#ff6500";
document.getElementsByTagName('li').item(3).style.color="#ff6500";
document.images[0].style.border="5px solid #000";
document.images['pic'].style.boxShadow="0 0 50px #333";
document.images.pic.style.height="200px";
document.getElementsByName('biao').style.backgroundColor="#ff6500";
document.getElementsByName('php').style.backgroundColor="#ff6500";
document.getElementById('php').style.color="#000";
document.links[0].style.fontSize="40px";
</script>
Guru membetulkan:查無(wú)此人Masa pembetulan:2019-03-26 09:22:20
Rumusan guru:完成的不錯(cuò),js獲取標(biāo)簽,很重要。這樣就可以控制元素。加油。