Q:

Return the text as I type in HTML form

How can I get the data of a text field as I type something in that text field without using any JavaScript library? Something like that is achieved in AngularJS like this:
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here">
<hr>
<h1>Hello {{yourName}}!</h1>

A:

Without any frameworks/libraries in the sense, you must bind keyup event to the input element and in the event handler you must update the DOM.

document.querySelector("input").addEventListener("keyup", function() {
    document.querySelector("h1 strong").textContent= this.value;
});
<label>Name:</label>
<input type="text" ng-model="yourName" placeholder="Enter a name here" value="">
<hr>
<h1>Hello <strong></strong></h1>

