Firefox ignores option selected=“selected”

前端 未结 20 1651
你的背包
你的背包 2020-11-28 21:59

If you change a dropdown and refresh the page, Firefox seems to ignore the selected attribute.

20条回答
  •  醉话见心
    2020-11-28 22:28

    To show the first item of the dropdown, use ProjectName.ClearSelection();

    Put lines in your design page to work on all browser And also put this on code behind on page load.

    $(document).ready(function () {
        $("#content_ProjectName option[value='1']").prop("selected", true);
    });
    

提交回复
热议问题