进来帮下忙吧,谢谢了
请问怎么在下面这个程序里面,对输入的temperature设置一个范围(10——100),如果小于10,跳出提示“不能下于10”,如果大于100,提示“不能大于100”
<script language="javascript">
var temperature=prompt("Please erter the temperature!","")
if(isNaN(temperature))
{alert("It is not a number,input again!")
temperature=prompt("Please erter the temperature!","")
document.write("Temperature: "+temperature)}
else document.write("Temperature: "+temperature)
</script>
[此贴子已经被作者于2006-4-25 16:58:28编辑过]