Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ALT tags/JavaScript

    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!

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    17,982
    Thanks
    203
    Thanked 2,536 Times in 2,514 Posts
    Quote Originally Posted by chefbrian
    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>");
    Last edited by Philip M; 05-01-2006 at 03:56 PM.

  • #3
    New to the CF scene
    Join Date
    May 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Cool! Thanks, Philip. Actually, it would have taken me more than 20 seconds to experiment. Let's just sat then that I'm lazy!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •