2021-04-20

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
				for(var i=1;i<=8;i++){
					for(k=1;k<=8-i;k++){
						document.write(" ");
					}
					for(var j=1;j<=(2*i-1);j++){
						
						document.write("*");
					}
					document.write("<br />");
				}
		 
			</script>
	</head>
	<body>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var a = "abc";
			document.write(a.split("").reverse().join("")+"<br />");
			
			var str="abc";
			var b=new Array(str.length);
			 var i=str.length-1;
			 var j=0;
			 while(i>=0)
			 {
			   b[j]=str.charAt(i);
			   i--;
			   j++;
			 }
			 for(j=0;j<str.length;j++)
			 {
			   document.write(b[j]);
			 }
			
		</script>
	</head>
	<body>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function com(){
				var a = document.getElementsByName("1");
				for(var i =0;i<=5;i++){
					if(a[i].checked == false)
					a[i].checked = true;
					else
					a[i].checked = false;
				}
			}
		</script>
	</head>
	<body>
		<input type="button" value="反选" onclick="com()" />
		<li>
			<input type="checkbox" name="1"/>
		</li>
		<li>
			<input type="checkbox" name="1"/>
		</li>
		<li>
			<input type="checkbox" name="1"/>
		</li>
		<li>
			<input type="checkbox" name="1"/>
		</li>
		<li>
			<input type="checkbox" name="1"/>
		</li>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var a = prompt("你想要几行数字?");
			for(var i =0;i<a;i++){
				//1.输入星星前面的空格
				var blank=a-i;
				for(var k =0;k<blank;++k){
					document.write("&nbsp;");
				}
				//2.打印星星
				var star = i*2-1;
				for(var j =0;j<star;++j){
					document.write("1");
				}
				//3.换行
				document.write("<br/>");
			}
		</script>
	</head>
	<body>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			
		</script>
	</head>
	<body>
		<input type="text" style="width: 410px;" id="t1"/><br />
		<input type="button" value="7" style="width: 100px;" />
		<input type="button" value="8" style="width: 100px;" />
		<input type="button" value="9" style="width: 100px;" />
		<input type="button" value="+" style="width: 100px;" onclick="plus()"/>
		<br />
		<input type="button" value="4" style="width: 100px;" />
		<input type="button" value="5" style="width: 100px;" />
		<input type="button" value="6" style="width: 100px;" />
		<input type="button" value="-" style="width: 100px;" onclick="minus()" />
		<br />
		<input type="button" value="1" style="width: 100px;" />
		<input type="button" value="2" style="width: 100px;" />
		<input type="button" value="3" style="width: 100px;" />
		<input type="button" value="*" style="width: 100px;" onclick="multiply()"/>
		<br />
		<input type="button" value="0" style="width: 100px;" />
		<input type="button" value="C" style="width: 100px;" />
		<input type="button" value="=" style="width: 100px;" />
		<input type="button" value="/" style="width: 100px;" onclick="divide()" />
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var a =[1,2,3];
			var arr1 = a;
			var arr2 = a.concat();
			console.log(arr1);
			console.log(arr2);
		</script>
	</head>
	<body>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var year = new Date().getFullYear();
			var month = new Date().getMonth()+1;
			var str = new Date(year,month,1);
			var weekday = new Array("星期日","星期一","星期二","星期三","星期四","星期五","星期六");
			console.log("下月1号是"+weekday[str.getDay()]);
		</script>
	</head>
	<body>
	</body>
</html>

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			function com(){
				var pwd1 = document.getElementById("pwd1").value;
				if(pwd1.length>=6)
				alert("注册成功!");
				else
				alert("密码长度不能小于6位!");
			}
		</script>
	</head>
	<body>
		用户名:<input type="text" id="t1" /><br />
		密码:<input type="password" id="pwd1" /><br />
		<input type="button" value="注册" onclick="com()" />
	</body>
</html>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值