<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
/* var salary=prompt("请输入工资");
if(salary>20000){
document.write("土豪");
}else if(salary<5000){
document.write("屌丝");
}else{
document.write("一般人");
}*/
</script>
</head>
<body>
<p οnclick="window.open('http://www.w3school.com.cn/')">打开</p>
<p οnclick="window.close()">关闭</p>
</body>
</html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
/* var salary=prompt("请输入工资");
if(salary>20000){
document.write("土豪");
}else if(salary<5000){
document.write("屌丝");
}else{
document.write("一般人");
}*/
</script>
</head>
<body>
<p οnclick="window.open('http://www.w3school.com.cn/')">打开</p>
<p οnclick="window.close()">关闭</p>
</body>
</html>