function goPages() { var m = document.getElementById("m").options[document.getElementById("m").selectedIndex].value; var d = document.getElementById("d").options[document.getElementById("d").selectedIndex].value; if ((d == "30") && (m == "2")) { return false; } if (d == "31") { if ((m == "2") || (m == "4") || (m == "6") || (m == "9") || (m == "11")) return false; } //跳转页面; location.href = m + "_" + d + ".html"; }
Done!