<form> <input type="text" name="userinput"> <input type="button" value="Add LI" onclick="AddLi(userinput.value)"> </form> <span id="out"/>