get current text <select>

后端 未结 2 1958
你的背包
你的背包 2021-01-23 02:11
                 

2条回答
  •  遥遥无期
    2021-01-23 02:40

    You don't need the semi colon after the html() function and val does not return the html which is what your looking for.

    alert($("#<%=sctFieldMain.ClientID %> option:selected").html());
    

    However if you had the following and wanted the value "Example" then you should use val()

    
    

提交回复
热议问题