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.
javascriptを使用して.NETでLinkButtonのテキストを取得するにはどうすればよいですか?
.innerHTMl、.innerText、.value を試しました...すべてが機能しません....
document.getElementById('lnk1').innerText
これはあなたの問題を解決するはずです、私は今それを試しました、そしてそれは働きます。 コードを見せてくれませんか。
サーバー側の制御にはClientIDを使用します。
document.getElementById('<%= lnk1.ClientID %>').innerText
asp.netサーバー側のコントロールで機能します。