开发者

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().

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜