Js1.html

<html> <script> function MyFunction() { var first, second; first = document.getElementById("firstname").value; second = document.getElementById("lastname").value; document.getElementById("here").innerHTML = first+" "+second; } </script> <body> First name:<br> <input type="text" id="firstname"> <br> Last name:<br> <input type="text" id="lastname"> <br> <input type="button" value="Send" onclick="MyFunction()"> <div id="here"></div> </body> </html>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.