In my code, I have an add function when user click on it. it will capture the user input value from the text and show. any idea how can I do it using javascript
var split = ['S','M', 'L'];
for (var i = 0; i < split.length; i++) {
var t = document.getElementById('text-box');
t.innerHTML += 'Size <input value=' + split[i] + ' type="text">Description<input type="text" name="vrow" id="price">'
}
function add(){
//get the description value
}
<div id="text-box">
</div>
<button onclick="add()">ADD</button>