Dropdown selection by value

Rajni.Shekhar
Posted by Rajni.Shekhar under JavaScript category on | Points: 40 | Views : 1143
function DDL_SelectedIndexByValue(ddl, val) {
for (var i = 0; i < ddl.options.length; i++) {
if (ddl.options[i].value == val) {
ddl.options[i].selected = true;
return;
}
}
}

Comments or Responses

Login to post response