$(document).ready(function(){ $(".topnav li ").stop(true,true).hover(function(){ $(this).children(".subnav").stop(true,true).slidedown(); },function(){ $(this).children(".subnav").stop(true,true).slideup(); }); }); var mu = function() { }; mu.now_menu_id = "nav01"; mu.path = location.pathname; mu.id_path = { "nav01": ["index.asp"], "nav02": ["about.asp","zizhi.asp","about.asp?id=24"], "nav03": ["news.asp?classid=53","news.asp?classid=54"], "nav04": ["fuwu.asp?id=29","fuwu.asp?id=27","fuwu.asp?id=26","fuwu.asp?id=25","fuwu.asp?id=33","fuwu.asp?id=35","fuwu.asp?id=31","fuwu.asp?id=30","fuwu.asp?id=34"], "nav05": ["case.asp"], "nav06": ["down.asp"], "nav07": ["contact.asp"], "nav08": ["download.asp"] }; mu._break = false; for (var id in mu.id_path) { for (var i in mu.id_path[id]) { if (mu.path.indexof(mu.id_path[id][i]) != -1) { mu.now_menu_id = id; mu._break = true; break; } } if (mu._break) break; } document.getelementbyid(mu.now_menu_id).classname = "curr"; function get_checkcode() { document.getelementbyid("checkcode").innerhtml = '鐐瑰嚮鍒锋柊楠岃瘉鐮? style=' } function cut(input,str,strname){ if (input.value.length >= str){ input.value = input.value.substring(0,str); } var reste = str - input.value.length; var print = reste; $("#"+strname).html("( "+input.value.length+'/'+str+' ) '); } function isemail(vemail){ var reginvalid=/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/; var regvalid=/^.+\@(\[?)[a-za-z0-9\-\.]+\.([a-za-z]{2,3}|[0-9]{1,3})(\]?)$/; return (!reginvalid.test(vemail)&®valid.test(vemail)); //var res = /^[0-9a-za-z_\-\.]+@[0-9a-za-z_\-]+(\.[0-9a-za-z_\-]+)*$/; //var res=/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; //return res.test(vemail); } function istel(str){ var reg=/(^(([0\+]\d{2,3}-)?(0\d{2,3})-)(\d{7,8})(-(\d{3,}))?$)|(^[0-9]{3,4}\-[0-9]{7,8}$)|(^[0-9]{7,8}$)|(^\([0-9]{3,4}\)[0-9]{3,8}$)|(^0{0,1}13[0-9]{9}$)|(^13\d{5,9}$)|(^153\d{4,8}$)|(^159\d{4,8}$)|(^158\d{4,8}$)|(^0\d{10,11}$)/; return (reg.test(str)) } function checkf(thef){ if(thef.ly_name.value==""){ alert("[濮撳悕]涓嶈兘涓虹┖!"); thef.ly_name.focus(); return false; } if(thef.phone.value==""){ alert("[鐢佃瘽]涓嶈兘涓虹┖!"); thef.phone.focus(); return false; } if(!istel(thef.phone.value)){ alert("鐢佃瘽鏍煎紡涓嶆纭?); thef.phone.focus(); return false; } // if(thef.iadd.value==""){ // alert("[鑱旂郴鍦板潃]涓嶈兘涓虹┖!"); // thef.iadd.focus(); // return false; // } // if (thef.imail.value!=""){ // if(!isemail(thef.imail.value)){ // alert("閭鏍煎紡涓嶆纭?); // thef.imail.focus(); // return false; // } // } if(thef.ly_body.value==""){ alert("[鍐呭]涓嶈兘涓虹┖!"); thef.ly_body.focus(); return false; } if(thef.verifycode.value==""){ alert("[楠岃瘉鐮乚涓嶈兘涓虹┖!"); thef.verifycode.focus(); return false; } return true; }