Html code
<input id="lon" type="number" > <input id="lat" type="number" > <button id="GoTo" onclick="GoTo()"> Zoom to</button>
The Javascript
` function GoTo() {
var lat = document.getElementById("lat").value;
var lon = document.getElementById("lon").value;
map.getView().setCenter(lon,lat);
map.getView().setZoom(9);
}`