Home  >  Article  >  Web Front-end  >  For advanced issues related to "img src=image address", please give me some advice_html/css_WEB-ITnose

For advanced issues related to "img src=image address", please give me some advice_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:58:43899browse

I want to put a lot of data in the image address, such as:
is conventional, I want Change to


Browse After the server submits the image request to the server, I change the name of the image to wg.png on the server side and return it to the browser.

Can the above method be done? n is much larger than 256, maybe around 5k.


Reply to the discussion (solution)

If you add it this way, the image will not be recognized. You can use the data-address method to tie it to the img.
For example:

You can get it directly like this:
$.data('address');

Data You follow the url

http://www.letuknowit.com/images/wg.png?data=xxxxxxxxxxxxxxxxxxxx

Leave the ready-made format alone

Data you follow the url

http://www.letuknowit.com/images/wg.png?data=xxxxxxxxxxxxxxxxxxxx

Leave the ready-made format alone


Ha, I didn’t know it could be used like this. Thank you very much!

If you add it this way, the image will not be recognized. You can use the data-address method to tie it to the img.
For example:

You can get it directly like this:
$.data('address');


Thank you so much!
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn