$(document).ready(function(){$("#send").click(function(){var c="";var b=false;if($("#name").val().length==0){c+="請輸入姓名\n"}if($("#email").val().length){var a=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;if(!$("#email").val().match(a)){c+="電子信箱格式錯誤\n"}}else{c+="請輸入電子信箱\n"}$(".taipeiCourse").each(function(){if($(this).attr("checked")){b=true}});$(".tokyoCourse").each(function(){if($(this).attr("checked")){b=true}});if(!b){c+="請選取至少一項台北講座或東京留學課程\n"}if(c.length){alert(c);return false}return true})});
