时间:2021-07-01 10:21:17 帮助过:2人阅读
恩
请单独定义拼接路径
var newUrl= json.path+'190x190'+json.localName;alert(newUrl);$(".pe_xgtxB_r span").css("background-image", newUrl);
$(".pe_xgtxB_r span").attr("style","background:url("+json.path+'190x190'+json.localName+") no-repeat");
或者
$(".pe_xgtxB_r span").css({"background-image":"url("+json.path+'190x190'+json.localName+")","background-repeat":"no-repeat"});
1楼2楼都好使