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 4 of 4

Thread: my new topic

  1. #1
    New Coder
    Join Date
    Feb 2010
    Location
    Armenia
    Posts
    41
    Thanks
    17
    Thanked 0 Times in 0 Posts

    Question my new topic

    for example in my HTML i have this code
    Code:
     <tag name='spesify' id='spesify'>hsahshhs</tag>
    what is the common syntax to reffer to that tag

    document.spesify.attribute=.....
    or
    spesify.attribute=.....
    or
    another thing....



    THx very much,previously.

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    Err..

    what?

    I guess you could try document.spesify.attribute but I've not really got any idea what you're trying to do.

  • #3
    Senior Coder rangana's Avatar
    Join Date
    Feb 2008
    Location
    Cebu City, Philippines
    Posts
    1,752
    Thanks
    65
    Thanked 372 Times in 365 Posts
    You can best refer to that tag with:
    Code:
    document.getElementById('spesify')
    Learn how to javascript at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph

  • #4
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,677
    Thanks
    6
    Thanked 1,008 Times in 981 Posts
    And remove the name attribute if the element is not a form control. It’s deprecated and not allowed according to strict HTML rules.


  •  

    Posting Permissions

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