Yohanne Posted March 4, 2014 Share Posted March 4, 2014 Hi Coders, how to get/pass input text value into new page as output using javascript? Link to comment https://forums.phpfreaks.com/topic/286687-after-submit-and-get-value-from-input-text-using-javascript/ Share on other sites More sharing options...
Q695 Posted March 4, 2014 Share Posted March 4, 2014 $_REQUEST is the stuff that does server requesting for data. Link to comment https://forums.phpfreaks.com/topic/286687-after-submit-and-get-value-from-input-text-using-javascript/#findComment-1471395 Share on other sites More sharing options...
Yohanne Posted March 4, 2014 Author Share Posted March 4, 2014 yes, i already done it in php and now i want it in javascscrip? Link to comment https://forums.phpfreaks.com/topic/286687-after-submit-and-get-value-from-input-text-using-javascript/#findComment-1471398 Share on other sites More sharing options...
Yohanne Posted March 4, 2014 Author Share Posted March 4, 2014 Something like this below but i want the value is show up in the new page. <body> <form> First Name: <input type="text" id="myText" name="fname" value="Mickey"><br> </form> <p>Click the button to return the value of the value attribute of the text field.</p> <p id="demo"></p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { var x = document.getElementById("myText").value; document.getElementById("demo").innerHTML=x; } </script> </body> Link to comment https://forums.phpfreaks.com/topic/286687-after-submit-and-get-value-from-input-text-using-javascript/#findComment-1471400 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.