I made a project using jquery to get the text of the selected item when the drop-down list selection changes. I wrote it as follows:
$("#rd ").change(function () {
$("#name").val($("#rd").find("option:checked").text());
});
Since the browser versions of the development environment are relatively high, IE10, FF23, Chrome29, the test was all fine. After deploying it to the server, there was a problem with the customer, and the text could not be obtained. After careful testing, I found that the selected option should be selected. After changing it to selected, there is no problem with IE6, 7, 7, 8, 10, FF, and chrome.
It seems that you are still careful when writing code. Higher version browsers are compatible with some attributes, but it makes programmers lazy. Alas, there is no way!