Управление сценариями просмотра Web-страниц


Пример 2. - часть 2


return true
}
// Генерация варианта
function main_calc(){
operand1 = f_operand()
window.document.test.op1.value = operand1
operand2 = s_operand()
window.document.test.op2.value = operand2
window.document.test.s_sign.value = sign
input = ""; window.document.test.input = ""
window.document.test.r0.value = " ???"
return true
}
// ->
</SCRIPT>
</HEAD>
<BODY>
<CENTER>
<H1>Математический тест</H1>
<HR>
<FORM NAME=test>
<TABLE BORDER=0>
<TR>
<TD><INPUT NAME=i10 TYPE=button VALUE="0-10" onClick="max_value=10"></TD>
<TD><INPUT NAME=i20 TYPE=button VALUE="0-20" onClick="max_value=20"></TD>
<TD><INPUT NAME=i100 TYPE=button VALUE="0-100" onClick="max_value=100"></TD>
<TD><INPUT NAME=i+ TYPE=button VALUE="+" onClick="set_sign("+")"></TD>
<TD><INPUT NAME=i- TYPE=button VALUE="-" onClick="set_sign("-")"></TD>
</TR>
</TABLE>
<HR>
<TABLE BORDER=0>
<TR>
<TD><INPUT NAME=op1 SIZE=2 MAXLENGTH=2></TD>
<TD><INPUT NAME=s_sign SIZE=1 MAXLENGTH=1></TD>
<TD><INPUT NAME=op2 SIZE=2 MAXLENGTH=2></TD>
<TD>=</TD>
<TD><INPUT NAME=result SIZE=3 MAXLENGTH=3></TD>
<TD><INPUT NAME=award TYPE=button VALUE="?" onClick="main_calc()">
<TD><INPUT NAME=r0 VALUE="???">
</TR>
</TABLE>
<HR>
<TABLE BORDER=2>
<TR>
<TD><INPUT NAME=b1 TYPE=button VALUE="1" onClick="input_sign("1")"></TD>
<TD><INPUT NAME=b2 TYPE=button VALUE="2" onClick="input_sign("2")"></TD>
<TD><INPUT NAME=b3 TYPE=button VALUE="3" onClick="input_sign("3")"></TD>



Начало  Назад  Вперед



Книжный магазин