开发者

how to find linkbutton id in javascript,

开发者 https://www.devze.com 2023-01-05 00:17 出处:网络
my linkbutton is in datalist, this datalist is in panel, this panel is in ajax updatepanel if linkbutton is not selected then need to alert a message...

my linkbutton is in datalist, this datalist is in panel, this panel is in ajax updatepanel

if linkbutton is not selected then need to alert a message...

how can i achieve开发者_开发技巧 this...


There are many ways you can achieve this, here is an example:


aspx:
<asp:LinkButton ID="lnk1" runat="server" OnClientClick="fireMyClick(this)"></asp:LinkButton>
js:
function fireMyClick(lnk)
{
    alert(lnk.id);
}


page.findcontrol(panlid).findcontrol(datalistid).findcontrol(linkbutonid)

i wrote code like this....

0

精彩评论

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