Blogger Information
Blog 18
fans 0
comment 0
visits 13466
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
JS循环练习-3.26
太早的博客
Original
868 people have browsed it

while循环 九九乘法表

实例

<!DOCTYPE html>
<html>
<head>
	<title>hello world!</title>
</head>
<body>
	<script type="text/javascript">
		var a=1;
		while(a<=9){
			var b=1;
			while(b<=a){
				document.write(b+'X'+a+'='+(a*b)+'  ');
				b++
			}
			a++
			document.write('<br>');
		}
	</script>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


while循环三角形

实例

<!DOCTYPE html>
<html>
<head>
	<title>hello world!</title>
</head>
<body>
	<script type="text/javascript">
		var a=1;
		while(a<=10){
			var b=1;
			while(b<=a){
				document.write('*');
				b++
			}
			a++
			document.write('<br>');
		}
	</script>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例


Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!