Question:Which of the following is the correct way to add an additional option and select it with jQuery? 

A $('#mySelect').append('<option value="whatever">text</option>').val('whatever') 

B $('#mySelect').html('<option value="whatever">text</option>').val('whatever') 

C ('#mySelect').text('<option value="whatever">text</option>').val('whatever') 

D $('#mySelect').val('whatever') 

+ Answer
+ Report
Total Preview: 661

Copyright © 2024. Powered by Intellect Software Ltd