📄 ceshi.html
字号:
<html>
<head>
<title>
test
</title>
<script type="text/javascript">
function getSum()
{
//var s;
//alert(document.horusform.h01.value);
//alert(document.horusform.h02.value);
s=parseInt(document.horusform.h01.value)+parseInt(document.horusform.h02.value)
+parseInt(document.horusform.h03.value)+parseInt(document.horusform.h04.value)
+parseInt(document.horusform.h05.value)+parseInt(document.horusform.h06.value)
+parseInt(document.horusform.h07.value)+parseInt(document.horusform.h08.value)
+parseInt(document.horusform.h09.value)+parseInt(document.horusform.h10.value);
alert(s);
document.horusform.hh.value = "您的总分是"+s;
//document.write("您的总分是"+s);
}
function validate()
{
if(isNAN(document.horusform.h01.value))
{
alert("error");
}
if(isNAN(document.horusform.h02.value))
{
alert("error");
}
else
{
alert("ok");
getSum();
}
}
function old()
{
document.horusform.h01.value = 2;
document.horusform.h02.value = 1;
document.horusform.h03.value = 4;
document.horusform.h04.value = 1;
document.horusform.h05.value = 3;
document.horusform.h06.value = 3;
document.horusform.h07.value = 4;
document.horusform.h08.value = 2;
document.horusform.h09.value = 1;
document.horusform.h10.value = 3;
}
</script>
</head>
<body onload="old()">
<p align="center">test-JAVASCRIPT
<hr noshade size="3" width="100%" color="#5523bb">
<table border="2" bordercolor="#234523" width="80%" align="center">
<form name="horusform" action="" method=post>
<tr>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td width="50%">
question:
</td>
<td width="50%">
1<input type="radio" name="h01" value="2" checked onclick="javascript:(document.horusform.h01.value=this.value)">
2<input type="radio" name="h01" value="1" onclick="javascript:(document.horusform.h01.value=this.value)">
3<input type="radio" name="h01" value="4" onclick="javascript:(document.horusform.h01.value=this.value)">
4<input type="radio" name="h01" value="3" onclick="javascript:(document.horusform.h01.value=this.value)">
</td>
</tr>
<tr>
<td>
question:
</td>
<td>
C++<input type="radio" name="h02" value="1" checked onclick="javascript:(document.horusform.h02.value=this.value)">
.NET<input type="radio" name="h02" value="4" onclick="javascript:(document.horusform.h02.value=this.value)">
JAVA<input type="radio" name="h02" value="3" onclick="javascript:(document.horusform.h02.value=this.value)">
JAVASCRIPT<input type="radio" name="h02" value="2" onclick="javascript:(document.horusform.h02.value=this.value)">
</td>
</tr>
<tr>
<td>
question:
</td>
<td>
util<input type="radio" name="h03" value="4" checked onclick="javascript:(document.horusform.h03.value=this.value)">
IO<input type="radio" name="h03" value="3" onclick="javascript:(document.horusform.h03.value=this.value)">
set<input type="radio" name="h03" value="2" onclick="javascript:(document.horusform.h03.value=this.value)">
parse<input type="radio" name="h03" value="1" onclick="javascript:(document.horusform.h03.value=this.value)">
<tr>
<td>
</td>
</tr>
<tr>
<td>
question:
</td>
<td>
request<input type="radio" name="h04" value="1" checked onclick="javascript:(document.horusform.h04.value=this.value)">
session<input type="radio" name="h04" value="3" onclick="javascript:(document.horusform.h04.value=this.value)">
page<input type="radio" name="h04" value="2" onclick="javascript:(document.horusform.h04.value=this.value)">
application<input type="radio" name="h04" value="4" onclick="javascript:(document.horusform.h04.value=this.value)">
<tr>
<td>
</td>
</tr>
<tr>
<td>
question:
</td>
<td>
insert<input type="radio" name="h05" value="3" checked onclick="javascript:(document.horusform.h05.value=this.value)">
update<input type="radio" name="h05" value="1" onclick="javascript:(document.horusform.h05.value=this.value)">
delete<input type="radio" name="h05" value="4" onclick="javascript:(document.horusform.h05.value=this.value)">
select<input type="radio" name="h05" value="2" onclick="javascript:(document.horusform.h05.value=this.value)">
<tr>
<td>
</td>
</tr>
<td>
question:
</td>
<td>
insert<input type="radio" name="h06" value="3" checked onclick="javascript:(document.horusform.h06.value=this.value)">
update<input type="radio" name="h06" value="1" onclick="javascript:(document.horusform.h06.value=this.value)">
delete<input type="radio" name="h06" value="4" onclick="javascript:(document.horusform.h06.value=this.value)">
select<input type="radio" name="h06" value="2" onclick="javascript:(document.horusform.h06.value=this.value)">
<tr>
<td>
</td>
</tr>
<td>
question:
</td>
<td>
insert<input type="radio" name="h07" value="4" checked onclick="javascript:(document.horusform.h07.value=this.value)">
update<input type="radio" name="h07" value="2" onclick="javascript:(document.horusform.h07.value=this.value)">
delete<input type="radio" name="h07" value="1" onclick="javascript:(document.horusform.h07.value=this.value)">
select<input type="radio" name="h07" value="3" onclick="javascript:(document.horusform.h07.value=this.value)">
<tr>
<td>
</td>
</tr>
<td>
question:
</td>
<td>
insert<input type="radio" name="h08" value="2" checked onclick="javascript:(document.horusform.h08.value=this.value)">
update<input type="radio" name="h08" value="1" onclick="javascript:(document.horusform.h08.value=this.value)">
delete<input type="radio" name="h08" value="4" onclick="javascript:(document.horusform.h08.value=this.value)">
select<input type="radio" name="h08" value="3" onclick="javascript:(document.horusform.h08.value=this.value)">
<tr>
<td>
</td>
</tr>
<td>
question:
</td>
<td>
insert<input type="radio" name="h09" value="1" checked onclick="javascript:(document.horusform.h09.value=this.value)">
update<input type="radio" name="h09" value="3" onclick="javascript:(document.horusform.h09.value=this.value)">
delete<input type="radio" name="h09" value="4" onclick="javascript:(document.horusform.h09.value=this.value)">
select<input type="radio" name="h09" value="2" onclick="javascript:(document.horusform.h09.value=this.value)">
<tr>
<td>
</td>
</tr>
<td>
question:
</td>
<td>
insert<input type="radio" name="h10" value="3" checked onclick="javascript:(document.horusform.h10.value=this.value)">
update<input type="radio" name="h10" value="1" onclick="javascript:(document.horusform.h10.value=this.value)">
delete<input type="radio" name="h10" value="2" onclick="javascript:(document.horusform.h10.value=this.value)">
select<input type="radio" name="h10" value="4" onclick="javascript:(document.horusform.h10.value=this.value)">
<tr>
<td>
</td>
</tr>
<tr>
<td colspan="2">
<input type="text" name="hh" size="20">
</td>
</tr>
<tr>
<td colspan="2">
<input type="button" name="okay" value="okay" onclick="getSum()">
</td>
</tr>
</form>
</table>
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -