|
|
| |
|
|
13³â Àü |
<form name="fwrite">
°¡°Ý<input type=text name="a" value="0" onkeyup="my_calc(this.form)">
¼ö·®: <input type=text name="a_count" size=3 onkeyup="my_calc(this.form)" value="1"> + Ãß°¡¿î¼Û·á: <input type=text name="a_dpay" value="0" onkeyup="my_calc(this.form)">
ÇÕ°è: <input type=text name="a_sum" size=6 readonly value="0"><br><br>
°¡°Ý<input type=text name="b" value="0" onkeyup="my_calc(this.form)">
¼ö·®: <input type=text name="b_count" size=3 onkeyup="my_calc(this.form)" value="1"> + Ãß°¡¿î¼Û·á: <input type=text name="b_dpay" value="0" onkeyup="my_calc(this.form)">
ÇÕ°è: <input type=text name="b_sum" size=6 readonly value="0"><br><br>
°¡°Ý<input type=text name="c" value="0" onkeyup="my_calc(this.form)">
¼ö·®: <input type=text name="c_count" size=3 onkeyup="my_calc(this.form)" value="1"> + Ãß°¡¿î¼Û·á: <input type=text name="c_dpay" value="0" onkeyup="my_calc(this.form)">
ÇÕ°è: <input type=text name="c_sum" size=6 readonly value="0"><br><br>
°¡°Ý<input type=text name="d" value="0" onkeyup="my_calc(this.form)">
¼ö·®: <input type=text name="d_count" size=3 onkeyup="my_calc(this.form)" value="1"> + Ãß°¡¿î¼Û·á: <input type=text name="d_dpay" value="0" onkeyup="my_calc(this.form)">
ÇÕ°è: <input type=text name="d_sum" size=6 readonly value="0"><br><br>
°¡°Ý<input type=text name="e" value="0" onkeyup="my_calc(this.form)">
¼ö·®: <input type=text name="e_count" size=3 onkeyup="my_calc(this.form)" value="1"> + Ãß°¡¿î¼Û·á: <input type=text name="e_dpay" value="0" onkeyup="my_calc(this.form)">
ÇÕ°è: <input type=text name="e_sum" size=6 readonly value="0"><br><br>
Àüü ÇÕ°è: <input type=text name="total" size=9 value="0">
</form>
<script language="javascript">
function my_calc(f){
if(f.a_count.value=="") f.a_count.value="0";
f.a_sum.value = eval(f.a.value) * eval(f.a_count.value) + eval(f.a_dpay.value) ;
if(f.b_count.value=="") f.b_count.value="0";
f.b_sum.value = eval(f.b.value) * eval(f.b_count.value) + eval(f.b_dpay.value) ;
if(f.c_count.value=="") f.c_count.value="0";
f.c_sum.value = eval(f.c.value) * eval(f.c_count.value) + eval(f.c_dpay.value) ;
if(f.d_count.value=="") f.d_count.value="0";
f.d_sum.value = eval(f.d.value) * eval(f.d_count.value) + eval(f.d_dpay.value) ;
if(f.e_count.value=="") f.e_count.value="0";
f.e_sum.value = eval(f.e.value) * eval(f.e_count.value) + eval(f.e_dpay.value) ;
if(f.e_count.value=="") f.e_count.value="0";
f.e_sum.value = eval(f.e.value) * eval(f.e_count.value) + eval(f.e_dpay.value) ;
//Ãß°¡
my_total();
}
function my_total(){
//Ãß°¡
var f = document.fwrite;
f.total.value = eval(f.a_sum.value)+ eval(f.b_sum.value) + eval(f.c_sum.value) + eval(f.d_sum.value) + eval(f.e_sum.value);
}
</script>
|
|
̵̧ : 392 |
̵̧
¸ñ·Ï
|
|
| |
|