how to create dynamic row with input fields in html table from given row

前端 未结 3 1483
醉话见心
醉话见心 2021-01-17 06:53

Im new for Html and javascript. I want to create dynamic row with input fields in table while click button,that number of row given from user. In my code, row created dynami

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-17 07:11

    First of all You are missing in wrapping the th, wrap the th in tr, and for new rows to append the previous row you have to use the insertRow porperty of javascript.

    Here is your modified snippet

    Thanks

    
    
    
        
        
        
    
        
    
    
    
    
    

提交回复
热议问题