<html>
<body>
E-mail: <input type="email" id="myEmail">
<p>Click the button to set the width of the email field.</p>
<button onclick="myFunction()">Try it</button>
<script>
function myFunction() {
document.getElementById("myEmail").size = "50";
}
</script>
</body>
</html>