只输出一个*。。。大神帮我看看呗
var arr=['*','**','***','**','****','***'];
function ptt(){
for(i=0;i<arr.length;i++){
document.write(arr[i]+"<br/>")}
}
var arr=['*','**','***','**','****','***'];
function ptt(){
for(i=0;i<arr.length;i++){
document.write(arr[i]+"<br/>")}
}
2016-04-10
<!DOCTYPE HTML>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>数组</title>
<script type="text/javascript">
var arr=['*','**','***','****','****','##*']
function app(){
for(var i=0;i<arr.length;i++)
document.write(arr[i]+"<br/>");
}
</script>
</head>
<body>
<input type="button" value="点击" onclick="app()">
</body>
</html>
点按钮就出一个*
举报