$(function () { $(".news-main-right-ul li").each(function (i) { if ((i + 1) % 3 == 1) { $(this).css("margin-left", "0"); } if ((i + 1) <= 3) { $(this).css("margin-top", "14px"); } }) $(".pic-main-right-ul li").each(function (i) { if ((i + 1) % 3 == 1) { $(this).css("margin-left", "0"); } if ((i + 1) <= 3) { $(this).css("margin-top", "14px"); } }) $(".vedio-main-right-ul li").each(function (i) { if ((i + 1) % 3 == 1) { $(this).css("margin-left", "0"); } if ((i + 1) <= 3) { $(this).css("margin-top", "14px"); } }) $(".submit").bind("click", function () { checkform(); }) $(".usersubmit").bind("click", function () { userform(); }) $(".kehusubmit").bind("click", function () { kehuform(); }) //var height = $(".news-main-right").height() + "px"; //alert(height); //$(".news-main-row3").css("height", height) }) function sethome(obj, url) { try{ obj.style.behavior='url(#default#homepage)'; obj.sethomepage(url); }catch(e){ if(window.netscape){ try{ netscape.security.privilegemanager.enableprivilege("universalxpconnect"); }catch(e){ alert("抱歉,此操作被浏览器拒绝!\n\n请在浏览器地址栏输入“about:config”并回车然后将[signed.applets.codebase_principal_support]设置为'true'"); } }else{ alert("抱歉,您所使用的浏览器无法完成此操作。\n\n您需要手动将【"+url+"】设置为首页。"); } } } function addfavorite(title, url) { try { window.external.addfavorite(url, title); } catch (e) { try { window.sidebar.addpanel(title, url, ""); } catch (e) { alert("抱歉,您所使用的浏览器无法完成此操作。\n\n加入收藏失败,请进入新网站后使用ctrl+d进行添加"); } } } function iframeheight() { var ifm = document.getelementbyid("bfra"); var subweb = document.frames ? document.frames["bfra"].document : ifm.contentdocument; if (ifm != null && subweb != null) { ifm.height = subweb.body.scrollheight; } } //表单验证 function checkform() { var username = $("#username").val(); var birthday = $("#birthday").val(); var education = $("#education").val(); var profession = $("#profession").val(); var time = $("#time").val(); var telephone = $("#telephone").val(); var intro = $("#intro").val(); var job = $("#job").val(); if (username.length <= 0 || birthday.length <= 0 || education.length <= 0 || profession.length <= 0 || time.length <= 0 || telephone.length <= 0 || intro.length <= 0 || job.length <= 0) { $(".tip").show(); return false; } else { $("#flag").val('1'); $("#sumitform").submit(); } } //客户—用户验证 function userform() { var school = $("#school").val(); var username = $("#username").val(); var intro = $("#intro").val(); var job = $("#job").val(); if (username.length <= 0 || school.length <= 0 || intro.length <= 0 || job.length <= 0) { $(".tip").show(); return false; } else { $("#flag").val('1'); $("#usersumitform").submit(); } } function kehuform() { var school = $("#school").val(); var username = $("#username").val(); var intro = $("#intro").val(); var job = $("#job").val(); if (username.length <= 0 || school.length <= 0 || intro.length <= 0 || job.length <= 0) { $(".tip").show(); return false; } else { $("#flag").val('1'); $("#kehusumitform").submit(); } } $(function () { $(".search").hover(function () { $(".search").css("background-color", "#98150e"); $(".searchform").slidedown(); }, function () { $(".search").css("background-color", "transparent"); $(".searchform").slideup(); }) $(".bgbox a").bind("click", function () { var key = $("#keyword").val(); if (key.length > 0) { location.href = "search.aspx?classcode=xwzx&sercher=" + key; } }) //$(".search").bind("click", function () { // var bgc = $(".search").attr("style"); // if (bgc.length <= 0) { // $(".search").attr("style", "background-color:#98150e"); // } // else { // $(".search").attr("style", ""); // } // $(".searchform").slidetoggle(); //}) })