[問題] 這樣子IE不支援?但firefox可以??

看板Web_Design作者 (ROLL)時間17年前 (2009/02/18 00:19), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/3 (看更多)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "" rel="nofollow">http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="" rel="nofollow">http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>未命名 1</title> <script language="javascript"> var monthDays = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30,31, 30, 31); function change_year() { var b_year = document.getElementById("b_year").value; if (((b_year % 4 == 0) && (b_year % 100 != 0)) || (b_year % 400 == 0)) {//閏年 monthDays[1] = 29; } var b_month = document.getElementById("b_month"); b_month.innerHTML = "<option selected=selected value=0>請選擇</option>"; for( var i=1 ; i <=12 ; i++) { b_month.innerHTML += "<option value=\""+i+"\">"+i+"月</option>"; } } function make_year() { var date = new Date(); now_year = date.getFullYear(); var b_year = document.getElementById("b_year"); b_year.innerHTML = "<option selected=\"selected\" value=\"0\">請選擇</option>"; for(var i=1940 ; i <= now_year ; i++) b_year.innerHTML += "<option value=\""+i+"\">"+i+"</option></select>"; } function make_day(the_day) { var b_day = document.getElementById("b_day"); for(var i=1 ; i <= monthDays[the_day-1] ; i++) b_day.innerHTML += "<option value=\""+i+"\">"+i+"</option></select>"; } </script> </head> <body onload="make_year()"> <select id="b_year" name="b_year" onchange="change_year()"> <option selected="selected" value="0">請選擇</option> </select>年 <select id="b_month" name="b_month" onchange="make_day(this.value)"> </select>月 <select id="b_day" name="b_day"> </select>日 </body> </html> 我這是想要做點選年之後產生月~點選月之後產生日 在firefox可以,但是在IE就不行... 是為啥啊?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.174.40.200
文章代碼(AID): #19ckED2D (Web_Design)
文章代碼(AID): #19ckED2D (Web_Design)