Hi,
I'm working of webform which have multiple html controls.
html
- <div>
- <label for="ddlJobType">Job Category</label>
- <select id="ddlJobCategory" class="form-control" onchange="getselectedVal(this);"></select>
- <label for="ddlJobType">Job Type</label>
- <select id="ddlJobType" class="form-control" onchange="getselectedVal(this);"></select>
- </div>
What parameter should be send to the called function? is parameter 'this' an efficient way?
jQuery
- function getselectedVal(**what should be the argument type**){
- alert('dropdown option:selected').val();
- }
I want to use the same function to give details of selected dropdown value. What should be the parameter type to access the selected html control.