jQuery(document).ready(function (a) { action() }); function action() { $(document.body).append(''); $("#roll_top").click(function () { $("html,body").animate({ scrollTop: "0px" }, 800) }); $("#ct").click(function () { $("html,body").animate({ scrollTop: $(".ct").offset().top }, 800) }); $(window).scroll(function (a) { if ($.browser.ie6) { $("#roll").css("top", $(this).scrollTop() + $(this).height() - 170) } if ($(this).scrollTop() > 260) { $("#roll").fadeIn() } else { $("#roll").fadeOut() } }) }; /*在线客服开始*/ function imState(){$.get("/ajax.ashx?action=imstate&t="+Math.random(),function(rsp){window.imInfo=eval("("+rsp+")");if(imInfo.imShow){$.getScript("/UserControls/Im/im.js?t="+Math.random(),function(){writeIm(imInfo.imData);});}else{$("#divOranIm").hide();}});} $(function(){$("body").append("
");imState();}); /*在线客服结束*/ $(function () { var value = $('#seachkeywords').val(); $('#seachkeywords').focus(function () { if (this.value == value) { this.value = ''; } }).blur(function () { if (this.value == '') { this.value = value; } }).keypress(function (event) { if (event.keyCode == '13') { $('#sousuo').click(); return false; } }); $('#sousuo').click(function () { var xz = $('#seachkeywords').val(); if (xz == value) { xz = ""; } window.location.href = '/Search/Index.aspx?objtype=product&kwd=' + xz; }); })