Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function addRow(id){
- i = document.getElementById("keyCount").getAttribute("value")
- i++
- var tbody = document.getElementById
- (id).getElementsByTagName("tbody")[0]
- var row = document.createElement("tr")
- var td1 = document.createElement("td")
- var td2 = document.createElement("td")
- var td3 = document.createElement("td")
- var td4 = document.createElement("td")
- var txtUserID = document.createElement("input")
- var txtAPIKey = document.createElement("input")
- txtUserID.setAttribute("name", "txtUserID" . i)
- txtUserID.setAttribute("onkeyup", "formValidate(this)")
- txtAPIKey.setAttribute("name", "txtAPIKey" . i)
- txtAPIKey.setAttribute("onkeyup", "formValidate(this)")
- td2.setAttribute("class", "valid")
- td4.setAttribute("class", "valid")
- td1.appendChild (txtUserID)
- td3.appendChild (txtAPIKey)
- row.appendChild(td1)
- row.appendChild(td2)
- row.appendChild(td3)
- row.appendChild(td4)
- tbody.appendChild(row)
- document.getElementById("keyCount").setAttribute("value", i)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement