jQuery修改背景图片

//获得点击图片的url 
var that = $(this).css("backgroundImage").replace('url(','').replace(')','');

//给所选元素更改url
$('#').css('background','url('+that+') no-repeat' );
原文地址:https://www.cnblogs.com/zcboy/p/7637904.html