Change Content - Javascript

Change html element content using pure javascript author(s): Deepu Mohan Puthrote (WarFox)

HTML

<!DOCTYPE html>
<html>
<body>

<p>Modify the text in the input field, then click outside the field to fire the onchange event.</p>

Enter something: <input   onchange="myFunction(this.value)">

<script>
function myFunction(val) {
  alert(" The new value is: " + val);
}
</script>

</body>
</html>