I have an input:

```
<input type="text" class="input" name="email" id="email" value="" disabled>

```

And JavaScript:

```
$email = "stackemail@emails.com";

function setEmail(email) {
        document.getElementById("email").value = email;
    }

    window.onload = setEmail($email);

```

Now, it does show the email in the input field just how i want it to:
[![it does show stackemail@emails.com](https://i.stack.imgur.com/gOKnS.png)](https://i.stack.imgur.com/gOKnS.png)

But it doesn't set the value when i inspect the element:
[![the value = "" ](https://i.stack.imgur.com/6L3XD.png)](https://i.stack.imgur.com/6L3XD.png)

Even when i change the value inside the inspect element, it stays "stackemail@emails.com" 

Now i need the value to be the same as what it is showing
Why is it not doing so?