How to get the value of the image src attribute?

You can get the value of image src by using this code:How to get the value of the image src attribute?

    <script>
      $(document).ready(function(){
        $('.button').click(function(){
          var images = $('.images img').attr('src');
          alert(images);      
        });
      });
    </script>

If you have any problems please leave your queries in the comment box.

How to get the value of the image src attribute?expoundsofttechsolution How to get the value of the image src attribute?