Jquery background-image

javascript jquery

31 观看

2回复

1 作者的声誉

How to put a background image with Jquery, if the name of the image is something like: ../image(01).png, being that if I put the name in this way ../image01.png if it works, but not when it has parentheses the name of the image

作者: Olbeng 的来源 发布者: 2017 年 12 月 27 日

回应 2


-1

3985 作者的声誉

Sounds to me like an URL encoding problem.

作者: Haroldo_OK 发布者: 2017 年 12 月 27 日

0

14631 作者的声誉

Try: /image%2801%29.png

That percent+number thing is called "percent-coding" and is a method to encode symbols for the URL, so 28 is ( and 29 is ) (see here as well).

You didn't provide any code samples but I assume that that's the problem, considering what little information you provided. If it doesn't work please edit your question. Also, next time you should google a bit before you ask, and when you do ask always include the relevant code sample.

作者: yuvi 发布者: 2017 年 12 月 27 日
32x32