I want to get the value from an input tag in HTML using JavaScript but I always get undefined. Help me solve this issue..
HTML code is as follows
<td><input type="text" class="number cost" value="10000"></td>
JavaScript is as follows
document.getElementsByClassName("cost").value;