点了按钮没有任何显示……
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>if...else</title> <script type="text/JavaScript"> function movie(){ var ticket = true; //ticket初值为true,表示有票 if(ticket == ture) { document.write("有票,可以看电影。"); } else { document.write("没票,电影看不成。"); } } </script> </head> <body> <input type="button" value="电影" onclick="movie()"> </body> </html>