jQuery to prepend URL in img src attribute

后端 未结 3 1811
有刺的猬
有刺的猬 2021-01-06 10:54

I just need a jQuery snippet to do the prepend in img src , i.e


The code snippet jQuery is to prepe

3条回答
  •  梦毁少年i
    2021-01-06 11:54

    Depending what your specific problem is, you might be able to sort out this problem with a base tag, but I assume you will only want this on images, but changing the src once the page has loaded will make the images reload? IF the images don't exist in the current location you will need to change the src attribute before the page is loaded (server side).

提交回复
热议问题