<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<h1>Playlist</h1>
<form>
<input type="text" id="songInput" placeholder="Enter a song">
<input type="button" id="songButton" value="Add to Playlist">
</form>
<ul id="playlist">
</ul>
</body>
</html>
The above html is linked to the following javascript:
window.onload = init;
function init(){
var button=document.getElementById("songButton");
button.onclick=handleSongButtonClick;
}
function handleSongButtonClick(){
var input = document.getElementById("songInput");
var songName = songInput.value;
var ul = document.getElementById("playlist");
var li = document.createElement("li");
li.value=songName;
ul.appendChild(li);
}
What is the problem when i enter a song all it gives is a bullet and no text value? Please help it can be found here http://jsbin.com/EROcOGo/2/edit