Question: ```
<select class=fruits">
<option value="Orange">Orange</option>
<option value="Apple">Apple</option>
<option value="Grapes">Grapes</option>
<option value="Kiwi">Kiwi</option>
</select>

```

it by default shows orange in the box but I want Grapes in a box. Please help
Thanks

Answer: 
If you want to use jQuery, then do it like this 

```
$("select.fruits").val("Grapes");

```

Javascript 

```
var element = document.getElementsByClassName('fruits')[0];
element.value = valueToSelect;

```
HTML Code:

```
<select class=fruits">
<option value="Orange">Orange</option>
<option value="Apple">Apple</option>
<option value="Grapes">admin</option>
<option value="Kiwi">Kiwi</option>
</select>

```

javascript:

```
$('.fruits option:eq(2)').attr('selected', 'selected');

```

eq(nth), you can pass index which option you want to select by default. it's start from 0 to n-1.