Javascript Add Table Row

后端 未结 2 1822
暗喜
暗喜 2020-12-22 00:55

I\'m not sure how to add a row where I want it.



        
2条回答
  •  南方客
    南方客 (楼主)
    2020-12-22 01:20

    Ok, so to add another row to the table after URL1, give the row before, URL1, an id attribute then append to the innerHTML. I set the JS to retrive the current URL number, starting with 1, so that each time you click the button, it appends a URL row.

    I also updated your name attribute to include the '' ticks

    
    
    
    ">
    Name:
    Password:
    URL: +
    ETC:

提交回复
热议问题