hhh

题目一

<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript">
			function sumbit() {
				<!--获取并弹窗-->
				var name = document.getElementById("name").value;
				var sex;
				var tmp1 = document.getElementsByName("sex");
				for (var i = 0; i < tmp1.length; i++) {
				    if (tmp1[i].checked) {
						sex = tmp1[i].value;
				    }
				}
				var hobby = [];
				var tmp2 = document.getElementsByName("hobby");
				for(var i = 0; i < tmp2.length; i++) {
				    if (tmp2[i].checked)
					{
						hobby.push(tmp2[i].value);
					}
				}
				alert("姓名:" + name + "\n性别:" + sex + "\n爱好:" + hobby);
			}
		</script>
	</head>
	<body>
		<!--主体 -->
		<p align="left">  号- 班- </p>
		姓名:<input type="text" name="" id="name" />
		<br>
		性别:
		<input type="radio" name="sex" value="男" />男
		<input type="radio" name="sex" value="女" />女
		<br>
		爱好:
		<input type="checkbox" name="hobby" value="篮球" />篮球
		<input type="checkbox" name="hobby" value="足球" />足球
		<input type="checkbox" name="hobby" value="游泳" />游泳
		<input type="checkbox" name="hobby" value="跑步" />跑步
		<br>
		<input type="button" name="" id="" value="提交" onclick="sumbit()"/>
	</body>
</html>




2

<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style>
			#butterfly {
				position: absolute;
				left: 0px;
				top: 0px;
				display: block;
			}
		</style>
				<!-- 定义轴向-->
		<script type="text/javascript">

			var x = 0;
			var y = 0;
			
			function fly() {
				var butterfly = document.getElementById("butterfly");
			if (x >= 0 && y == 0) {x += 10;}	
				if (x >= 0 && y == 0) {x += 10;}
				if (x == 600 && y >= 0) {y += 10;}
				if (x <= 600 && y == 640) {x -= 10;}
				if (x == 0 && y <= 640) {y -= 10;}
				
				butterfly.style.left = x + "px";
				butterfly.style.top = y + "px";
			}
				
			setInterval("fly()","45");
		</script>
	</head>
	<body>
		<p align="left">  - 班- </p>
		<img src="./img/背景.jpg" width="650px" height="640px"/>
		<img id="butterfly" src="./img/蝴蝶.gif" />
	</body>
</html>

Q.E.D.


---------我大体上尊崇理性和意志,却也不菲薄情感和想象---------