Home  >  Article  >  Web Front-end  >  Call js function or js variable in img src="" of html to dynamically specify the image path_HTML/Xhtml_web page production

Call js function or js variable in img src="" of html to dynamically specify the image path_HTML/Xhtml_web page production

WBOY
WBOYOriginal
2016-05-16 16:38:122808browse

I found a lot of online resources for this problem. Here are several methods. In the experiment,

Copy the code
The code is as follows:

Seaside Style, so that the JS function NextPic() can be called.

Excerpted for your convenience
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