Get value of image src by id of img

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mohan30
    New Member
    • Sep 2014
    • 1

    #1

    Get value of image src by id of img

    <img id="" value="apple" src="http://example.com/">
    get the value apple by console.log using javascript plz anss me thank youo
    Last edited by Dormilich; Sep 3 '14, 07:05 AM.
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    you do that through the src property.

    Comment

    Working...