奇数(11~99)四个一行输出.html

<style type="text/css">
*{
margin: 10px;
padding: 5px;
box-sizing: border-box;
}
span{
/*width: 200px;
height: 100px;*/
display: inline-block;
text-align:center;
line-height: 35px;
height: 50px;
width: 50px;
border: outset 3px yellow;
}
span:hover{
border: dashed red 2px;
color: red;
background-color:pink;65

}
</style>
<body>

<script type="text/javascript">
// 求奇数
var count=0
for (var i=11;i<=99;i++)
{
if(i%2===0)
{
count++
if(count%5===0)
{
document.writeln('<br />')
}
continue

}
document.writeln('<span>'+i+'</span>')
}
</script>

posted @ 2020-04-13 16:24  阿向向  阅读(193)  评论(0编辑  收藏  举报