你可真是牛啊牛啊
<meta charset="UTF-8" />
<style>
.word{
width: 200;
float: left;
}
</style>
<div style="margin-left: 200">
<img src="http://heliang.tech/1/head.png" style="float: left"/>
<h2>个人boki</h2>
<p>记录个人生活</p>
</div>
<div style="margin-left: 100;border: 1px solid #000;height: 50px;width: 1200px">
<center>
<h5 class='word' style="margin-left: 100" id="a">首页</h5>
<h5 class='word' id="b">个人介绍</h5>
<h5 class='word' id="c">爱好</h5>
<h5 class='word' id='d' >作品</h5>
<h5 class='word' id="e">留言板</h5>
</center>
</div>
<center style="amrgin-top:70">
<img src="http://heliang.tech/1/1.png" />
<img src="http://heliang.tech/1/2.png" />
<img src="http://heliang.tech/1/3.png" />
<img src="http://heliang.tech/1/4.png" /><br />
<img src="http://heliang.tech/1/5.png" />
<img src="http://heliang.tech/1/6.png" />
<img src="http://heliang.tech/1/7.png" />
<img src="http://heliang.tech/1/8.png" />
</center>
<script>
turn = 0
a.onclick = function(){
if(turn!='a'){
a.style.backgroundColor = 'red'
turn='a'
}
else if(turn=='a'){
a.style.backgroundColor = ''
turn = 0
}
}
b.onclick = function(){
if(turn!='b'){
b.style.backgroundColor = 'red'
turn='b'
}
else if(turn=='b'){
b.style.backgroundColor = ''
turn = 0
}
}
c.onclick = function(){
if(turn!='c'){
c.style.backgroundColor = 'red'
turn='c'
}
else if(turn=='c'){
c.style.backgroundColor = ''
turn = 0
}
}
d.onclick = function(){
if(turn!='d'){
d.style.backgroundColor = 'red'
turn='d'
}
else if(turn=='d'){
d.style.backgroundColor = ''
turn = 0
}
}
e.onclick = function(){
if(turn!='e'){
e.style.backgroundColor = 'red'
turn='e'
}
else if(turn=='e'){
e.style.backgroundColor = ''
turn = 0
}
}
</script>
厉害的杨泽宇
by 贺老师 at 2021-12-19