Jquery selected values
$(document).ready(function () {
//Store the sub types
StoreSubTypes();
开发者_高级运维 //Set up company Type on Change
$("#option").change(CompanyTypeOnChange);
$(".status").change(InsuranceTypeChange);
CompanyTypeOnChange();
} );
Your options are missing a value.
For example change <option>Car Loan</option>
to <option value="Car Loan">Car Loan</option>
value is an attribute of the option tag(<option value="">
), and this,rather than the textnode value which in the option tag, will be received when form post.
if you just want to get the textnode value,then use some option.innerHTML,or $(option).text().
精彩评论