Question: There I have a button that is hidden from the user but want it to be clicked by default like with a check box if you want it to be checked by default you add the checked attribute is there any way you could do the same thing with a button here is my code

```
<input id="submit" type="hidden" value="Reverse Geocode" autofocus> 

```

Answer: 
You can do as following:

```
<script type="text/javascript">
document.getElementById("submit").click();
</script>

```
At first, your button is not a button. It's a a hidden field.

In order to make it a button, change `type="hidden"` to `type="button"`. To make it invisible to the user, you could use inline styles like this: `style="display: none;"`.

As a result, your button looks like this: 
`<input id="submit" style="display: none" type="button" value="Reverse Geocode">`

---

Now, to click it, simply call the `click()` method:

```
document.getElementById('submit').click();

```