How to assign input value in html?

Discussion in 'HTML and CSS' started by MuhammedRefaat, Sep 22, 2013.

  1. MuhammedRefaat

    MuhammedRefaat

    Joined:
    Sep 22, 2013
    Messages:
    1
    Likes Received:
    0
    I have a checkbox declared as input into html, the way i use to give it a value is the ordinary way :-

    <input type="checkbox" name="test" value="val">
    but what if i want to get the value of the input by processing some code, i tried that like :-

    <input type="checkbox" name="test" value=(itemoptions[oi]).toString()>
    but that gives me ("(itemoptions[oi]).toString()") not the value of it :stupido3:

    p.s. "itemoptions" is an array contains strings
     
    MuhammedRefaat, Sep 22, 2013
    #1
    1. Advertisements

  2. MuhammedRefaat

    kgaurav

    Joined:
    Jan 16, 2015
    Messages:
    4
    Likes Received:
    0
    Location:
    India
    which programming language you are using??
     
    kgaurav, Jan 16, 2015
    #2
    1. Advertisements

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.