I have the following text field:

```
<input type="password" id="seed" placeholder="Enter Seed" onkeydown="if (event.keyCode == 13) { setSeed(value.toUpperCase()); refreshPage(); }"/>

```

This does a function when I enter input and press enter. I have now added a submit button underneath which I want to do the same function when clicked.

```
<input type="submit" value="Submit" onkeydown="if (event.keyCode == 13) { setSeed(value.toUpperCase()); refreshPage(); }">

```

Could someone help tell me how I refer to the value in the text field. Also if "onkeydown" is correct e.g. it shouldn't be something like "onclick".

Thanks!