Hi,
I am generating a random number. Then i click start. How can i see random value of q1 in html row after i click on start button?
<!DOCTYPE html>
<html>
<HEAD>
<SCRIPT language="JavaScript">
<!--hide
function newtext()
{
var q1=Math.floor(Math.random()*11)
document.myform.mytext.value=q1;
setTimeout("moretext()",4000);
}
function moretext()
{
document.myform.mytext.disabled = true;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM name="myform">
<table width='600' cellpadding='5' cellspacing='5' border='1'>
<tr><td colspan=6 align='right'><INPUT TYPE="button" name="but1" value="start " onClick="newtext()"></td></tr>
<tr> <td> q1 * 2 </td> <td> <INPUT type="text" name="mytext" value="" size="30"> </td> </tr> // once i click start, how can i see random value of q1 in html row?
<tr><td colspan=6 align='right'><INPUT TYPE="button" name="but1" value="Submit!" onClick="newtext()"></td></tr>
</table>
</FORM>
</body>
</html>