<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			//1-10000 之间能同时被3、5、7 整除的数,输出到页面上,每6个换行
			window.onload = function(){
				var j = 0;
				for(var i = 1; i <=10000; i++){
					if(i % 3 == 0 && i % 5 == 0 && i % 7 == 0){
						document.write(i + '、');
						j++;
						if(j == 6){
							document.write('<br>');
							j = 0;
						}
					}
				}
			}
		</script>
	</head>
	<body>
	</body>
</html>

js计算357整除的数_javascript