Sunday, August 16, 2009

Reading select component selected values in javascript

Reading select component selected values in javascript:

1. If you have the select object as SelectObject:

SelectObject.options[SelectObject.selectedIndex].value

2. If you are passing the value to javascript function through this component only

function(this.options[this.selectedIndex].value);

No comments:

Post a Comment