<html> <head> <script type="text/javascript" src="js/jquery-1.3.2.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("img").attr("src", function() { return "/images/" + this.title; }); }); </script> </head> <body> <body> <img title="a.gif"/> </body> </html>