...

View Full Version : ALT tags/JavaScript



chefbrian
05-01-2006, 03:39 PM
I've been going over my website, adding the ALT property I originally forgot to use with images I have.

This has me puzzled. I have a number of images inside a JavaScript slide show function. Can a person use the ALT property inside JavaScript? Will the slide show still run properly?

I know I could experiment, but if someone could help, that would save time. Thanks!

Philip M
05-01-2006, 03:51 PM
I know I could experiment, but if someone could help, that would save time.

An experiment lasting 20 seconds would have told you that the answer is yes. You can use alt tags as well as width, height etc.

Example:-

document.write("<p align='center'><img src='" + arday[day] + "' alt = 'MyImage' width=271 height=168 border=0>");

chefbrian
05-01-2006, 04:43 PM
Cool! Thanks, Philip. Actually, it would have taken me more than 20 seconds to experiment. Let's just sat then that I'm lazy!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum