<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<img class="logo" src="https://pbs.twimg.com/media/B5aXOWzIMAA1DoS.png" alt="flower">
<script type="text/javascript">
$(document).ready(function(){
var alt_name=$(\'.logo\').attr(\'alt\');
alert(alt_name);
});
</script>