<html>
<body>
Homepage: <input type="url" id="myURL">
<p>Click the button to return which type of form element the URL field is.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
let x = document.getElementById("myURL").type;
document.getElementById("demo").innerHTML = x;
}
</script>
</body>
</html>