Tuesday, February 28, 2017

sorting from a sorted list

function sortthisrecord() {
var thenewrecord = document.getElementById("sns_theinput").value
var thesortedlist = document.getElementById("sns_thesortedlist")
var thesortedlistarray = thesortedlist.innerHTML.split(";")
thesortedlistarray.push(thenewrecord)
thesortedlist.innerHTML = thesortedlistarray.join(";")}

No comments:

Post a Comment