You could also do this:

$('img').attr('src').split('/').slice(-1);

-----Original Message-----
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of David .Wu
Sent: Tuesday, April 28, 2009 3:36 AM
To: jQuery (English)
Subject: [jQuery] How to get file name


<img src="images/xxx.gif">

$('img').attr('src') -> This will get images/xxx.gif How to get xxx.gif by
jQuery?


Reply via email to