- 1
Can anybody help with this module quiz of web development fundamentals
Your page has a text field with the id="num" and a button with id="print". Fill in the blanks to handle the click event on the button and alert the value of the text field. window .onload = function() { let n = document.getElementById("num"); let btn = document.getElementById(" print "); btn .onclick = function() { alert (n. ____ ); }; }; what will come in that blank space andd why
1 Resposta
+ 2
Asked to print button value..
So use :
n.value or n.innerHTML;