Home >Web Front-end >JS Tutorial >Jquery method to obtain and modify the src value of img_jquery

Jquery method to obtain and modify the src value of img_jquery

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:59:591528browse

Get:

Copy code The code is as follows:

$("#imgId")[0] .src;

Modify:
Copy code The code is as follows:

$("#imgId").attr('src',path);
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