Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私は持っています
<asp:TextBox runat="server" TextMode="MultiLine" id="txtHelpText" />
Web ページに複数回追加されました。
jqueryを使用してその値を取得したい -
$(this).find('input[id*=txtHelpText]').val();
を削除するとTextMode="MultiLine"、期待どおりに機能し、値が提供されますが、Multiline では機能しません。
TextMode="MultiLine"
を設定TextMode="MultiLine"すると、出力はtextareaではなく になりinputます。したがって、これを使用する必要があります:
textarea
input
$(this).find('textarea[id*=txtHelpText]').val();