examples/dom/get_value_of_input_box.html
<input id="data" size="30">
<button id="btn">Click me</button>
<div id="display"></div>

<script src="get_value_of_input_box.js"></script>
examples/dom/get_value_of_input_box.js
"use strict";

function clicked() {
    var input_value = document.getElementById('data').value;
    document.getElementById('display').innerHTML = input_value;
}

document.getElementById('btn').addEventListener('click', clicked);;