Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <input type="text" class="abc" placeHolder="Name">
- <input type="text" class="abc" placeHolder="Surname">
- <input type="text" class="abc" placeHolder="Address">
- <button id="btn">Show</button>
- const button = document.getElementById("btn");
- var inputs = document.getElementsByClassName("abc");
- button.addEventListener('click', function(){
- for (var i = 0; i <= inputs.lenght; i++){
- alert(inputs[i].value);
- }
- });
Add Comment
Please, Sign In to add comment