dynamic text box

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • shin

    dynamic text box

    How can i dynamically add text box with button clicked in javascript?

    shin
  • Robert

    #2
    Re: dynamic text box

    shin wrote:[color=blue]
    > How can i dynamically add text box with button clicked in javascript?
    >
    > shin[/color]

    <button onclick="
    var textInput = document.create Element('input' );
    textInput.type = 'text';
    textInput.value = 'value';
    document.getEle mentById('inser tHere').appendC hild(textInput) ;
    ">Click me!</button>
    <div id="insertHere" >
    </div>

    For more info see:


    Robert.

    Comment

    • sk

      #3
      Re: dynamic text box

      Thx it worked!

      shin

      "Robert" <robert@noreply .x> wrote in message
      news:43326165$0 $11076$e4fe514c @news.xs4all.nl ...[color=blue]
      > shin wrote:[color=green]
      >> How can i dynamically add text box with button clicked in javascript?
      >>
      >> shin[/color]
      >
      > <button onclick="
      > var textInput = document.create Element('input' );
      > textInput.type = 'text';
      > textInput.value = 'value';
      > document.getEle mentById('inser tHere').appendC hild(textInput) ;
      > ">Click me!</button>
      > <div id="insertHere" >
      > </div>
      >
      > For more info see:
      > http://www.w3.org/TR/2000/REC-DOM-Le...Core-20001113/
      >
      > Robert.[/color]


      Comment

      Working...