📄 jsq2.htm
字号:
<html>
<head>
<title>计算器(二)</title>
<style type="text/css">
<!--
body { font-family: "宋体"; font-size: 9pt; margin-top: 0px; margin-left: 0px; margin-right: 0px}
A { COLOR: black; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: none }
A:hover { COLOR: red; FONT-SIZE: 9pt; FONT-WEIGHT: 400; TEXT-DECORATION: underline }
a:active { font: 9pt "宋体"; cursor: hand; color: #FF0033 }
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body bgcolor="#fef4d9">
<br>
<br>
<center><font color=red face="隶书" size=6>计算器(二)</font></center>
<br>
<br><center>
<table border=5 bordercolor=blue borderlight=green>
<tr><td align=center><font size=5 color=red face="Arial, Helvetica, sans-serif"><strong>下面框中为脚本显示区</strong></font></td></tr>
<tr><td align=center><script language="JavaScript">
<!--
function equa1() {
a = document.form1.aa.value;
b = document.form1.ab.value;
c = a-b;
document.form1.total1.value = c
}
function equa2() {
a = document.form1.ba.value;
b = document.form1.bb.value;
c = (a*1)+(b*1);
document.form1.total2.value = c
}
function equa3() {
a = document.form1.ca.value;
b = document.form1.cb.value;
c = a/b;
document.form1.total3.value = c
}
function equa4() {
a = document.form1.da.value;
b = document.form1.db.value;
c = a*b;
document.form1.total4.value = c
}
//-->
</script>
<form name="form1"><center>
<table border=1 cellpadding=1 cellspacing=1>
<tr>
<td><input type="text" size=5 name="aa"> - <input type="text" name="ab" size=5></td>
<td> =<input type="text" name="total1" size=5></td>
<td><input type="button" value="Calculate" onClick="equa1()"></td>
<tr>
<td><input type="text" size=5 name="ba"> + <input type="text" name="bb" size=5></td>
<td> =<input type="text" name="total2" size=5></td>
<td><input type="button" value="Calculate" onClick="equa2()"></td>
<tr>
<td><input type="text" size=5 name="ca"> / <input type="text" name="cb" size=5></td>
<td>=<input type="text" name="total3" size=5></td>
<td><input type="button" value="Calculate" onClick="equa3()"></td>
<tr>
<td><input type="text" size=5 name="da"> * <input type="text" name="db" size=5></td>
<td> =<input type="text" name="total4" size=5></td>
<td><input type="button" value="Calculate" onClick="equa4()"></td>
<tr>
<td colspan=3 align=center>
<input type="reset" value="Reset"></td>
</table>
</form>
</td></tr></table></center>
<br>
<br>
<center>
<textarea name=source rows=12 cols=45 class=yk9>
脚本说明:
把如下代码加入<body>区域中
<script language="JavaScript">
<!--
function equa1() {
a = document.form1.aa.value;
b = document.form1.ab.value;
c = a-b;
document.form1.total1.value = c
}
function equa2() {
a = document.form1.ba.value;
b = document.form1.bb.value;
c = (a*1)+(b*1);
document.form1.total2.value = c
}
function equa3() {
a = document.form1.ca.value;
b = document.form1.cb.value;
c = a/b;
document.form1.total3.value = c
}
function equa4() {
a = document.form1.da.value;
b = document.form1.db.value;
c = a*b;
document.form1.total4.value = c
}
//-->
</script>
<form name="form1"><center>
<table border=1 cellpadding=1 cellspacing=1>
<tr>
<td><input type="text" size=5 name="aa"> - <input type="text" name="ab" size=5></td>
<td> =<input type="text" name="total1" size=5></td>
<td><input type="button" value="Calculate" onClick="equa1()"></td>
<tr>
<td><input type="text" size=5 name="ba"> + <input type="text" name="bb" size=5></td>
<td> =<input type="text" name="total2" size=5></td>
<td><input type="button" value="Calculate" onClick="equa2()"></td>
<tr>
<td><input type="text" size=5 name="ca"> / <input type="text" name="cb" size=5></td>
<td>=<input type="text" name="total3" size=5></td>
<td><input type="button" value="Calculate" onClick="equa3()"></td>
<tr>
<td><input type="text" size=5 name="da"> * <input type="text" name="db" size=5></td>
<td> =<input type="text" name="total4" size=5></td>
<td><input type="button" value="Calculate" onClick="equa4()"></td>
<tr>
<td colspan=3 align=center>
<input type="reset" value="Reset"></td>
</table>
</form>
</textarea>
<SCRIPT LANGUAGE="JavaScript">
<!-- hide
function goHist(a)
{
history.go(a);
}
//-->
</script>
<FORM METHOD="post">
<INPUT TYPE="button" VALUE="返回" onClick="goHist(-1)" style="background-color: #8000FF; color: rgb(255,255,255)">
</form>
</center>
<br>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -