Search
 
SCRIPT & CODE EXAMPLE
 

HTML

Vanilla JavaScript Responsive Form

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" cont`ent="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>Name Echoer</title>

        <script type="text/javascript">
            function evaluateUserInput(){
                let userInputFirstName = document.getElementById("first_name").value;
                let userInputLastName = document.getElementById("last_name").value;
                let outputDisplay = "Your name is: " + userInputFirstName + " " + userInputLastName;
                document.getElementById("output").innerHTML = outputDisplay;
                return false;
            }
        </script>
    </head>
    
    <body>
        <form id="myform">
          First name:<br><input id="first_name" type="text"><br>
          Last name:<br><input id="last_name" type="text"><br>
          <button id="submit_button" onClick="return evaluateUserInput();">Submit</button>
        </form> 
        <p id="output">placeholder text until the `submit_button` is clicked</p>
    </body>
</html>
Comment

PREVIOUS NEXT
Code Example
Html :: multiline input in html 
Html :: old input file 
Html :: wp bakery add shortcode backend 
Html :: ionic ngfor show limited number of items 
Html :: laravel afficher fichier 
Html :: pass parameter 2 html button 
Html :: spin the wheel html 
Html :: uttwuuwudqtudutauutduatTDUaduatduituitdA 
Html :: ubuntu focal end of life 
Html :: space animation html 
Html :: do you put the author and date in article tag html 
Html :: how to embed mp4 html 
Html :: how to get a result in the input form 
Html :: reuse html elemrnt id 
Html :: %2f in query 
Html :: web development html chapter 1 
Html :: physical and logical tags in html 
Html :: razor view comment out line 
Html :: divs 
Html :: html form date para fecha limitada 
Html :: ubuntu 19.10 vmware 
Html :: star icon angular material 
Html :: enter more than one function in onclick event js 
Html :: sample html code for homepage 
Html :: send html email from outlook 
Html :: print tag in html 
Html :: bootstrap display error message 
Css :: remove bullets from ul 
Css :: css background image size to fit screen 
Css :: absolute vertical position css 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =