JavaScript DHTML/jQuery/Img

Материал из Web эксперт
Перейти к: навигация, поиск

Get Image alt message

   <source lang="html4strict">
  

<html>

 <head>
   <script type="text/javascript" src="js/jquery-1.3.2.js"></script>
   <script type="text/javascript">
       $(document).ready(function(){
            $("img").attr({ 
                src: "http://wbex.ru/style/logo.png",
                title: "wbex.ru",
                alt: "Logo"
            });
            $("div").text($("img").attr("alt"));
       });
   </script>
 </head>
 <body>
   <body>
     <img />
 </body>

</html>


 </source>