开发者

Get LinkButton text using javascript

开发者 https://www.devze.com 2023-01-30 02:01 出处:网络
How can i get the text of LinkButton in .NET using javascript? Tried .innerHTMl, .innerText, .value...all n开发者_运维问答ot working....document.getElementById(\'lnk1\').innerText

How can i get the text of LinkButton in .NET using javascript?

Tried .innerHTMl, .innerText, .value...all n开发者_运维问答ot working....


document.getElementById('lnk1').innerText 

this should solve your problem, i tried it now and it works.
can you show me your code.


for server side control use ClientID.

document.getElementById('<%= lnk1.ClientID %>').innerText

works for asp.net server side controls.

0

精彩评论

暂无评论...
验证码 换一张
取 消