js打印倒正金字塔

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>打印倒正金字塔</title>

</head>

<body style="text-align:center;">

<script  type="text/javascript">
document.write("<h3>打印倒正金字塔直线</h3>");
  var i= 61; 
  while(i>0){ 
      document.write("<hr width="+i+"%/>");
      i=i-10;
  }
  for(var j=11;j<70;j=j+10){
      document.write("<hr width="+j+"%/>");
  }
</script>

</body>
</html>

猜你喜欢

转载自blog.csdn.net/danqiu2017/article/details/79227768
今日推荐