$(function () { $("#txtkey1").keydown(function (e) { if (e.keycode == 13) { search(); } }); $("#txtkey2").keydown(function (e) { if (e.keycode == 13) { search2(); } }); $(".equip3 .equip3slide .swiper-scrollbar ").addclass("swiper-scrollbar-drag"); if($(window).width()<1004) { $(".newsdbox .content").find("img").css({"max-width":"100%","height":"auto"}); } }); function prompt_fun(a) { $(a).after("
"); if ($('body').height() > $(window).height()) { $('#layer1').height($('body').height()); } else { $('#layer1').height($(window).height()); } $('#layer1').width($('body').width()); $(a).css({ left: ($('body').width() - $(a).width()) / 2, top: $(window).scrolltop() + ($(window).height() - $(a).height()) / 2 }); $('#layer1').fadeto("fast", 0.6); $(a).show(); //$(a).fadein("slow"); $('#layer1').click(function () { close_prompt_fun(a); }) } function close_prompt_fun(a) { //$(a).fadeout("fast"); $(a).hide(); $('#layer1').fadeout("slow", function () { $('#layer1').remove(); }); if ($("#example_video_1").length > 0) { document.getelementbyid("example_video_1").pause(); } } function search() { if (document.getelementbyid("txtkey1").value == "") { alert("请输入您要搜索的关键字!"); } else { location.href = "/search.aspx?k=" + document.getelementbyid("txtkey1").value; } } function search2() { if (document.getelementbyid("txtkey2").value == "") { alert("请输入您要搜索的关键字!"); } else { location.href = "/search.aspx?k=" + document.getelementbyid("txtkey2").value; } }