<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>if...else</title><script type="text/JavaScript">var ticket =true; //ticket初值为true,表示有票if(ticket=="true") {document.write("有票,可以看电影。");}else {document.write("没票,电影看不成。");}</script></head><body></body></html>
添加回答
举报
0/150
提交
取消