Javascript form number

Discussion in 'Javascript' started by rd, Nov 19, 2003.

  1. rd

    rd Guest

    How can I get the form number by using the this command?

    document.forms[6] is the seventh form on the page

    If the seventh form looked like this:

    <form>
    <input type="button" onclick="myFunction(this)">
    </form>

    How can I make myFunction return the number 6?

    this.form.??


    Thanks,

    rd
     
    rd, Nov 19, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Li Zhang
    Replies:
    4
    Views:
    6,095
    softip
    Feb 27, 2009
  2. Replies:
    7
    Views:
    641
  3. rd

    Javascript form number

    rd, Nov 19, 2003, in forum: Javascript
    Replies:
    2
    Views:
    64
  4. rob c
    Replies:
    4
    Views:
    337
    McKirahan
    Dec 30, 2005
  5. Abhishek
    Replies:
    5
    Views:
    218
    David Mark
    Aug 7, 2008
Loading...

Share This Page