Pls how can i get an input value from biodata.html file while clicking a button in logging.html file | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Pls how can i get an input value from biodata.html file while clicking a button in logging.html file

<input type="text" Id="text"> <input type="submit"> <script type="text/JavaScript" src="cl.js"> 2file.... <input type="submit" id="submit"> <script type="text/JavaScript" src="cl.js"/> cl.js.. window.onload=function update(){ var submit=document.getElementById("submit") submit.onclick=function update(){ var text=document.getElementById("text") alert(text.value) } }

10th Jun 2018, 9:46 PM
Olatunde Taiwo Oladele
Olatunde Taiwo Oladele - avatar
1 Answer
0
i think because "text" and "submit" are reserved words in javascript and shouldn´t be used as variables....
10th Jun 2018, 11:43 PM
Lorenzo Sandoval
Lorenzo Sandoval - avatar