www.webdeveloper.com
Results 1 to 3 of 3

Thread: javacript variable with a variable

  1. #1
    Join Date
    May 2011
    Posts
    2

    javacript variable with a variable

    i have a variable need to change value in javascript

    but this variable name composed with another variable ,

    how can i change the value of that variable



    document.form.aaa_id.value where id is a variable , thx

  2. #2
    Join Date
    Dec 2003
    Location
    Bucharest, ROMANIA
    Posts
    15,428
    Use square bracket notation
    Code:
    document.form['aaa_'+id]

  3. #3
    Join Date
    May 2011
    Posts
    2
    it works well , thanks so much

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles