87,907
社区成员
发帖
与我相关
我的任务
分享
<a href="page2.html?1" target="_blank">1</a> <a href="page2.html?2" target="_blank">2</a> <a href="page2.html?3" target="_blank">3</a>....
page2.html中所有图片默认隐藏
<style>img{display:none}</style>
<img src="1.jpg" id="img1"><img src="2.jpg" id="img2">.<img src="3.jpg" id="img3">..........
<script>
var id=location.search.substring(1);
if(id)document.getElementById('img'+id).style.display=''
</script>