if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) {

 var body=document.getElementById("body");

body.style.backgroundImage = "url('https://a.xn--xu0a.cn/sj')";
     
   } else {
       
             var body=document.getElementById("body");

body.style.backgroundImage = "url('https://a.xn--xu0a.cn/')";

        };

先给body设置id为body