$(document).ready(function(){ $(".PicBH a img").hover(function () { $(".PicBH a img").not($(this)).stop().animate({ opacity: 0.5 }, 500); }, function () { $(".PicBH a img").not($(this)).stop().animate({ opacity: 1 }, 500); }); }) //--------------------------------------------- 上面是 图片清晰与遮罩变化,产品系统,首页,系统各页用 //-----------------------------------------------------------返回顶部 //当滚动条的位置处于距顶部200像素以下时,跳转链接出现,否则消失 $(function () { $("#back-TOP").click(function(){ $('body,html').animate({scrollTop:0},1000); return false; }); }); //-----------------------------------------------------------返回顶部 //------------------------------------辅助IE6\7\8\9 支持表单的 placeholder属性 $(function(){ //判断浏览器是否支持placeholder属性 supportPlaceholder='placeholder'in document.createElement('input'), placeholder=function(input){ var text = input.attr('placeholder'), defaultValue = input.defaultValue; if(!defaultValue){ input.val(text).addClass("phcolor"); } input.focus(function(){ if(input.val() == text){ $(this).val(""); } }); input.blur(function(){ if(input.val() == ""){ $(this).val(text).addClass("phcolor"); } }); //输入的字符不为灰色 input.keydown(function(){ $(this).removeClass("phcolor"); }); }; //当浏览器不支持placeholder属性时,调用placeholder函数 if(!supportPlaceholder){ $('input').each(function(){ text = $(this).attr("placeholder"); if($(this).attr("type") == "text"){ placeholder($(this)); } }); } }); //-----------------------------------------------------------body渐显 $(function() { var p = $("body"); var offset = p.offset(); $("#fadeDiv").css({ top: offset.top, left: offset.left, width: $("#bodyDiv").width(), height: $("body").height(), backgroundColor: "white", opacity: 1, position: "absolute" }); if (jQuery.isReady) { $("#fadeDiv").fadeOut(1000); } }) //----------------------------------------------------------------------------------- function killErrors() { //-- Hide纠错, return true; } window.onerror = killErrors; function KillError() { //-- 禁止另存, return false; } window.onerror=KillError;