<html>
<head>
<meta charset='utf-8'>
<title>conditional statement2</title>
<!-- <script>
var number=prompt('请输入一个数字(1-100):','');
if(number=='50'){
document.write('恭喜您,答对了!')
}else if(number<'50'){
document.write('您猜的数字小了点,换个大的试试看!')
}
else{
document.write('您猜的数字大了点,换个小的试试看!')
}
</script> -->
<script>
var number=prompt('请输入一个数字(1-100):','');
if(number<'50'&&number>'20'){
document.write('恭喜您,答对了!')
}else{
document.write('很遗憾,答错了!')
}
</script>
</head>
<body>
</body>
</html>