我基本上是在尝试让用户输入的值被检查并确认它是一个介于 10 和 100 之间的数字,一旦确认存储到变量“num2”中 - 谢谢
<!DOCTYPE html>
<html>
<body>
<script type ="text/javascript">
<!--
function numcheck(pass) {
var num2 =0;
isNan()= numcheck(pass);
if (isNan() == true)
{
alert("You can only enter a number in the text field");
}
else if (isNan() <=10 || isNan(p) >=100)
{
alert ("You must enter a number between 10 and 100");
}
else
num2 = inNan();
alert ("You have entered var2" + "which has now been stored, thankyou");
return num2;
-->
</script>
Number: <input type = “text” name = “numcheck” />
<button onClick="numcheck();"/> Enter </button>
</body>
</html>