<!DOCTYPE html>
<html>
<body>

Search: <input type="search" id="mySearch">

<p>Click the button to display which type of form element the search field is.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("mySearch").type;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>