将javascript事件添加到datagrid控件 [英] Adding javascript event to datagrid control
问题描述
您好,
我需要将一个Javascript事件(onClick)添加到servercontrol
(asp:复选框)。复选框被命名为''cbDoMail''。
假设''cbDoMail.Attributes.Add(" onClick"," doJavascriptThing()")
会做这项工作,不幸的是它没有。
有人能指出我正确的方向吗?
谢谢!
这应该没问题。主题中提到的数据网格在哪里?
Eliyahu
" Sjaakie Helderhorst" <二********* @ hotNOTmail.com>在消息中写道
news:%2 **************** @ TK2MSFTNGP12.phx.gbl ...你好,
我需要将一个Javascript事件(onClick)添加到servercontrol
(asp:复选框)。复选框被命名为''cbDoMail''。
假设''cbDoMail.Attributes.Add(" onClick",doJavascriptThing())
将完成这项工作,不幸的是它没有''' t。
有人能指出我正确的方向吗?
谢谢!
< blockquote>您好,
您可以直接将onClick属性添加到复选框中,如
< asp:CheckBox onClick =" doJavascriptThing()" runat = server>
" Sjaakie Helderhorst" <二********* @ hotNOTmail.com>在消息中写道
新闻:#2 ************** @ TK2MSFTNGP12.phx.gbl ...
您好,
我需要将一个Javascript事件(onClick)添加到servercontrol
(asp:复选框)。复选框被命名为''cbDoMail''。
假设''cbDoMail.Attributes.Add(" onClick"," doJavascriptThing()")
会做这项工作,不幸的是它没有。
有人能指出我正确的方向吗?
谢谢!
这将添加服务器端事件。如果需要客户端,
属性是可行的方式。
Eliyahu
" ;希瓦" < SH ****** @ online.excite.com>在消息中写道
news:ut ************** @ TK2MSFTNGP09.phx.gbl ...>
您可以直接将onClick属性添加到复选框中,如
< asp:CheckBox onClick =" doJavascriptThing()" runat = server>
" Sjaakie Helderhorst" <二********* @ hotNOTmail.com>在消息中写道
新闻:#2 ************** @ TK2MSFTNGP12.phx.gbl ...
您好,我需要添加一个Javascript event(onClick)到servercontrol
(asp:复选框)。复选框被命名为''cbDoMail''。
假设''cbDoMail.Attributes.Add(" onClick",doJavascriptThing())
将完成这项工作,不幸的是它没有''' t。
有人能指出我正确的方向吗?
谢谢!
Hello,
I need to add a Javascript event (onClick) to a servercontrol
(asp:checkbox). Checkbox is named ''cbDoMail''.
Assumed that ''cbDoMail.Attributes.Add("onClick", "doJavascriptThing()")
would do the job, unfortunately it didn''t.
Can anyone point me in the right direction?
Thanks!
This should be fine. Where is the datagrid mentioned in the subject?
Eliyahu
"Sjaakie Helderhorst" <di*********@hotNOTmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...Hello,
I need to add a Javascript event (onClick) to a servercontrol
(asp:checkbox). Checkbox is named ''cbDoMail''.
Assumed that ''cbDoMail.Attributes.Add("onClick", "doJavascriptThing()")
would do the job, unfortunately it didn''t.
Can anyone point me in the right direction?
Thanks!
Hi,
You can directly add the onClick attribute to the checkbox as in
<asp:CheckBox onClick="doJavascriptThing()" runat=server>
"Sjaakie Helderhorst" <di*********@hotNOTmail.com> wrote in message
news:#2**************@TK2MSFTNGP12.phx.gbl...
Hello,
I need to add a Javascript event (onClick) to a servercontrol
(asp:checkbox). Checkbox is named ''cbDoMail''.
Assumed that ''cbDoMail.Attributes.Add("onClick", "doJavascriptThing()")
would do the job, unfortunately it didn''t.
Can anyone point me in the right direction?
Thanks!
This will add a server-side event. If a client-side one is needed,
Attributes is the way to go.
Eliyahu
"Shiva" <sh******@online.excite.com> wrote in message
news:ut**************@TK2MSFTNGP09.phx.gbl...Hi,
You can directly add the onClick attribute to the checkbox as in
<asp:CheckBox onClick="doJavascriptThing()" runat=server>
"Sjaakie Helderhorst" <di*********@hotNOTmail.com> wrote in message
news:#2**************@TK2MSFTNGP12.phx.gbl...
Hello,
I need to add a Javascript event (onClick) to a servercontrol
(asp:checkbox). Checkbox is named ''cbDoMail''.
Assumed that ''cbDoMail.Attributes.Add("onClick", "doJavascriptThing()")
would do the job, unfortunately it didn''t.
Can anyone point me in the right direction?
Thanks!
这篇关于将javascript事件添加到datagrid控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!