chrismiceli
09-18-2002, 02:57 AM
plz help, it worked just fine then I changed one thing and it doesn't work, so it is something minor
<html>
<head>
<title>test</title>
<script language="javascript">
function di() {
var ran_num = Math.round(5*Math.random()) + 1;
var ran_num0 = Math.round(5*Math.random()) + 1;}
document.form1.res.value = ran_num;
document.form1.res0.value = ran_num0;
document.form1.put.disabled=true;
}
</script>
</head>
<body>
<form name="form0">
Enemy's Health:<br>
<input type="text" name="foehealth" value="500"><p>
</form>
<form name="form1">
<input type="text" name="res" size="2" value="">
<input type="text" name="res0" size="2" value=""><br>
<input type="button" name="put" value="Roll Dice" onClick="di()"><p>
<input type="button" name="hit" value="Attack" onClick="jjj()">
<body>
</form>
</form>
</body>
</html>
<html>
<head>
<title>test</title>
<script language="javascript">
function di() {
var ran_num = Math.round(5*Math.random()) + 1;
var ran_num0 = Math.round(5*Math.random()) + 1;}
document.form1.res.value = ran_num;
document.form1.res0.value = ran_num0;
document.form1.put.disabled=true;
}
</script>
</head>
<body>
<form name="form0">
Enemy's Health:<br>
<input type="text" name="foehealth" value="500"><p>
</form>
<form name="form1">
<input type="text" name="res" size="2" value="">
<input type="text" name="res0" size="2" value=""><br>
<input type="button" name="put" value="Roll Dice" onClick="di()"><p>
<input type="button" name="hit" value="Attack" onClick="jjj()">
<body>
</form>
</form>
</body>
</html>