$(function () { $("img").each(function () { $(this)[0].src=$(this)[0].src.replace('www.gdcmxy.edu.cn','test.gdcmxy.edu.cn') }) $(".head_nav_met_27_1 .top-box .bgcfff").css("background","url(http://test.gdcmxy.edu.cn/img/2022/www/logo.jpg)"); $(".head_nav_met_27_1 .top-box .bgcfff").css("background-size","cover") })