0
How to output value of a button in js when the button is clicked?
3 odpowiedzi
+ 1
Output where? Anyway, just use the click event, grab the value of the input, and output it.
document.getElementById('button-id').addEventListener('click', function() {
console.log(document.getElementById('textbox-id').value);
});
0
If you learnt and tried to understand JavaScript course on SoloLearn, you wouldn't have to ask here.
0
Can you please help me here pls?
https://code.sololearn.com/Wj1MQ6T1o4U7/?ref=app