Simpan variabel input pengguna

function getInputFromTextBox() {
    var input = document.getElementById("userInput").value;
    alert(input);
}
Annoying Alligator