圆问题
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Document</title>
<style>
#header {
font-size: 30px;
}
.hang div{
float: left;
font-size: 20px;
margin-top: 10px;
line-height: 10px;
height: 10px;
width: 100px;
}
.shuru {
height: 18px;
width:150px;
}
.last {
margin-top: 10px;
width: 50px;
}
#last-left {
font-size: 5px;
line-height: 5px;
height: 20px;
width: 100px;
}
#last-right {
font-size: 5px;
line-height: 5px;
height: 20px;
width: 50px;
margin-left: 13px;
}
</style>
</head>
<body>
<div id="header">计算圆面积</div>
<div class="hang">
<div>圆的半径</div>
<input type="text" class="shuru" id="shuru1">
</div>
<div class="hang">
<div>圆的面积</div>
<input type="text" class="shuru" id="shuru2" readonly="true">
</div>
<div id="last">
<input type="button" id="last-left" value="计算圆的面积">
<input type="button" id="last-right" value="重置">
</div>
</body>
<script src="js/jquery-1.11.2.min.js"></script>
<script>
function area(radius){
var s=0
s=Math.PI*radius*radius
s=s.toFixed(2)
return s
}
function show(s){
$("#shuru2").val(s)
}
$().ready(function(){
$("#last-left").click(function(){
var r=$("#shuru1").val()
show(area(r))
})
$("#last-right").click(function(){
$("#shuru1").val(" ")
$("#shuru2").val(" ")
})
})
</script>
</html>
邮件问题
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>邮件</title>
<style>
table {
width: 400px;
font-size: 24px;
border: 1px solid gray;
}
table td {
border: 1px solid gray;
}
table th {
background: green;
border: 1px solid gray;
}
</style>
</head>
<body>
<table>
<tr><th>状态</th><th>发件人</th><th>主体</th></tr>
<tr><td><input type="checkbox" id="checkItem1"><label></label></td><td>王小二</td><td>明天去买衣服</td></tr>
<tr><td><input type="checkbox" id="checkItem2"><label></label></td><td>张伟</td><td>一起看电影</td></tr>
<tr><td><input type="checkbox" id="checkItem3"><label></label></td><td>二丫</td><td>可不可以一起写作业</td></tr>
<tr><td><input type="checkbox" id="checkItem4"><label></label></td><td>春花</td><td>明天一起看比赛</td></tr>
</table>
<input type="button" value="全选" id="anniu1">
<input type="button" value="取消" id="anniu2">
<input type="button" value="反选" id="anniu3">
<input type="button" value="删除" id="anniu4">
</body>
<script src="js\jquery-1.11.2.min.js"></script>
<script>
$().ready(function(){
$("#anniu1").click(function(){
$('input:checkbox').prop("checked",true)
})
$("#anniu2").click(function(){
$('input:checkbox').prop("checked",false)
})
$("#anniu3").click(function(){
$("input:checkbox").each(function(){
if($(this).prop("checked")==true){
$(this).prop("checked",false)
}
else if($(this).prop("checked")==false){
$(this).prop("checked",true)
}
})
})
$("#anniu4").click(function(){
$("input:checkbox").each(function(){
if($(this).prop("checked")==true){
var n=$(this).parents("tr").index()
$("table tr").eq(n).remove()
}
})
})
})
</script>
</html>
登录界面
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>邮件</title>
<style>
table {
width: 400px;
font-size: 24px;
border: 1px solid gray;
}
table td {
border: 1px solid gray;
}
table th {
background: green;
border: 1px solid gray;
}
</style>
</head>
<body>
<table>
<tr><th>状态</th><th>发件人</th><th>主体</th></tr>
<tr><td><input type="checkbox" id="checkItem1"><label></label></td><td>王小二</td><td>明天去买衣服</td></tr>
<tr><td><input type="checkbox" id="checkItem2"><label></label></td><td>张伟</td><td>一起看电影</td></tr>
<tr><td><input type="checkbox" id="checkItem3"><label></label></td><td>二丫</td><td>可不可以一起写作业</td></tr>
<tr><td><input type="checkbox" id="checkItem4"><label></label></td><td>春花</td><td>明天一起看比赛</td></tr>
</table>
<input type="button" value="全选" id="anniu1">
<input type="button" value="取消" id="anniu2">
<input type="button" value="反选" id="anniu3">
<input type="button" value="删除" id="anniu4">
</body>
<script src="js\jquery-1.11.2.min.js"></script>
<script>
$().ready(function(){
$("#anniu1").click(function(){
$('input:checkbox').prop("checked",true)
})
$("#anniu2").click(function(){
$('input:checkbox').prop("checked",false)
})
$("#anniu3").click(function(){
$("input:checkbox").each(function(){
if($(this).prop("checked")==true){
$(this).prop("checked",false)
}
else if($(this).prop("checked")==false){
$(this).prop("checked",true)
}
})
})
$("#anniu4").click(function(){
$("input:checkbox").each(function(){
if($(this).prop("checked")==true){
var n=$(this).parents("tr").index()
$("table tr").eq(n).remove()
}
})
})
})
</script>
</html>
web最后一个问
main 页面
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>主页面</title>
</head>
<frameset cols="20%,80%" frameborder="no" border="0">
<frame src="left.html">
<frame name="show">
</frameset>
</div>
<script src="js\jquery-1.11.2.min.js"></script>
<script></script>
</html>