為什么彈不出對(duì)話框?
<!DOCTYPE HTML>
<html>
?? ?<head>
?? ?
?? ??? ?<meta http-equiv="content-type" content="text/type"; charset="utf-8"/>
?? ??? ?<title>消息對(duì)話框</title>
?? ?</head>
?? ?<body>
?? ?
?? ??? ??? ?<script type="text/javascript">
?? ??? ??? ?
?? ??? ??? ??? ?function rec(){
?? ??? ??? ??? ?
?? ??? ??? ??? ??? ?var =tong;
?? ??? ??? ??? ??? ??? ?tong =prompt("請(qǐng)輸入你的年齡?");
?? ??? ??? ??? ??? ?if (tong>=18){
?? ??? ??? ??? ??? ??? ?document.write("你已經(jīng)成年");
?? ??? ??? ??? ??? ?}else{
?? ??? ??? ??? ??? ??? ?document.write("你未成年");
?? ??? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ?}
?? ??? ??? ?
?? ??? ??? ?</script>
?? ?
?? ?
?? ??? ??? ?<form>
?? ??? ??? ??? ?<input name="button" type="button" onClick="rec()" value="點(diǎn)擊輸入你的成績(jī)" />
?? ??? ??? ?</form>
?? ??? ?
?? ??? ?
?? ?
?? ?</body>
?? ?
</html>
2015-02-24