Home>

Hi. Need to add code

<
DIV Class= "TR" >
      ≪
DIV Class= "Name" >
        ≪
INPUT TYPE= "TEXT" VALUE= "NAMPING" />
      ≪
/div >
      ≪
DIV Class= "CONT" >
         ≪
INPUT TYPE= "TEXT" VALUE= "K-WHO" />
      ≪
/div >
      ≪
div class= "Price" >
         ≪
INPUT TYPE= "TEXT" VALUE= "Price" />
      ≪
/div >
      ≪
INPUT TYPE= "Button" value= "Delete" class= "adds" onClick= "Obj.add_str ()" />
   ≪
/div >

In the element, and then I want to add event handlers to the fields and the dynamically button. How to better add this huge piece of code to another block ≪ Div > ? Create each element CreateElement. And add through AppendChild It will take a long time.

@ Alexey Shimansky Please look at the date, because the question was set three years ago (set 13 Nov '12 at 14:04).

user1854472021-05-03 23:00:10

Yes, unfortunately, people often do not march questions as marked ... and our spirit will receive them from dust ...

cyadvert2021-05-03 23:00:10
  • Answer # 1

    You can enactivate and shove the blocks into containers, which are described in this topic: then read the contents of these blocks (innerhtml) and stored in the desired location. And cho, quite suitable.

  • Answer # 2

    You can enactivate and shove the blocks into containers, which are described in this topic: then read the contents of these blocks (innerhtml) and stored in the desired location. And cho, quite suitable.