I have a dynamically created select option using a javascript function. the select object is
<
Instead of modifying the HTML itself, you should just set the value you want from the relative option element:
$(function() { $("#country").val("ID"); });
In this case "ID" is the value of the option "Indonesia"