bilis_money Posted October 23, 2007 Share Posted October 23, 2007 Hi I want to know if how a javascript can recognize the name of a picture. Let say i have two pictures. Picture A. name is "bubble.jpg" ...then Picture B. name is "duck.jpg" When i hover the mouse using the onmouseover() function on one of the picture. The javascript should smart enough to recognize the name of the picture and display the name of that picture. Is this possible? If so, please could you show me some sample codes for this please. Thank you very much in advance. Quote Link to comment Share on other sites More sharing options...
fenway Posted October 23, 2007 Share Posted October 23, 2007 Say what? You mean the .src or the .name? Quote Link to comment Share on other sites More sharing options...
nogray Posted October 23, 2007 Share Posted October 23, 2007 JS like any other programming language will do what you tell it. If you don't say what's the image src, the script can't find it. You can make a function and pass the image src to the function <a href="#" onmouseover="do_something('bubble.jpg');">Some text</a> This way your function will take the source image and do what it needs using that. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.