PopUp Message又名Msgbox [英] PopUp Message aka Msgbox
问题描述
全部
在田野和山丘上搜寻了一个很好的例子但是
alass而不是香肠我找到了,不是很好!
我明白你不能拥有一个msgbox并且已经使用在Onclick上使用Javascript的解决方案来获得
事件。
事件。 />
代码:
DeleteBtn.Attributes.Add(" onClick"," javascript :return
确认(''你真的想要?'');")
现在这很好,有效并给我一个OK和CANCEL >
选项,问题是如何获得返回值?
似乎无法在任何地方找到答案!
谢谢
您好
在onclick按钮事件中调用javascript函数。
试试这个:
DeleteBtn.Attributes.Add
(" onClick"," javascript :checkConfirm ())
< script language = javascript>
function checkConfirm()
{
var res = confirm(''你真的想要吗?' ');
//用户资源
}
< / script>
Ravikanth [MVP]
-----原始消息-----
所有
已经在田野和山丘上搜寻了一个很好的例子
butalass不是我发现的香肠,不太好!
我知道你不能拥有一个msgbox并且已经来了解Onclick <使用Javascript的解决方案<事件。
代码:
DeleteBtn.Attributes.Add(" onClick"," javascript :return
确认(''你真的想要?'');")
现在这很好,工作并给我一个OK和CANCEL
选项,问题是我怎么得到返回值?
似乎无法在任何地方找到答案!
谢谢
。
嗨
在onclick按钮事件中调用javascript函数。
试试这个:
DeleteBtn.Attributes.Add
(" onClick"," javascript :checkConfirm()")
< script language = javascript>
函数checkConfirm()
{
var res = confirm(''你真的想要吗?');
//用户res
}
< / script>
Ravikanth [MVP]
-----原始信息-----
所有
已经在田野和山上搜寻了一个很好的例子
butalass而不是香肠我找到了,不完全!
我知道你不能拥有一个msgbox并且已经开始使用在Onclick
活动中使用Javascript的解决方案。
DeleteBtn.Attributes.Add(" onClick"," javascript :return
确认(''你真的想要吗?' ');")
现在这很好,工作并给我一个OK和CANCEL
选项,问题是如何获得返回值?
似乎无法在任何地方找到答案!
谢谢
。
yop,
试试这个:
>
WebControlButton.Attributes.Add(" onClick"," javascript :if(!confirm(''" &
MessageToDisplay& "''))返回false;"
此致,
-
S. Justin Gengo,MCP
Web开发人员
免费代码库位于:
www.aboutfortunate.com
混乱无序。
Nietzche
" yop" < yo*@oceanfree.net>在消息中写道
news:0a **************************** @ phx.gbl ... < blockquote class =post_quotes>所有
已经在田野和山丘上搜寻了一个很好的例子,但是我找到了没有香肠的alass,不太好!
>我知道你不能拥有一个msgbox并且已经开始使用在Onclick
活动中使用Javascript的解决方案。
代码:
DeleteBtn.Attributes.Add(" onClick"," javascript :return
确认(''你真的想要?'');")
选项,问题是如何获得返回值?
似乎无法在任何地方找到答案!
谢谢
All
Have searched the fields and hills for a good example but
alass not a sausage have I found, well not quite!
I understand that you cannot have a msgbox and have come
up with the solution to use Javascript on the Onclick
Event.
Code:
DeleteBtn.Attributes.Add("onClick", "javascript:return
confirm(''Do you really want to?'');")
Now this is fine, works and gives me an OK and CANCEL
option, problem is how do I get a return value?
Cannot seem to find an answer to this anywhere!
Thanks
Hi
Call a javascript function in onclick event of button.
Try this:
DeleteBtn.Attributes.Add
("onClick", "javascript:checkConfirm()")
<script language=javascript>
function checkConfirm()
{
var res = confirm(''Do you really want to?'');
//user res
}
</script>
Ravikanth[MVP]
-----Original Message-----
All
Have searched the fields and hills for a good example butalass not a sausage have I found, well not quite!
I understand that you cannot have a msgbox and have come
up with the solution to use Javascript on the Onclick
Event.
Code:
DeleteBtn.Attributes.Add("onClick", "javascript:return
confirm(''Do you really want to?'');")
Now this is fine, works and gives me an OK and CANCEL
option, problem is how do I get a return value?
Cannot seem to find an answer to this anywhere!
Thanks
.
Hi
Call a javascript function in onclick event of button.
Try this:
DeleteBtn.Attributes.Add
("onClick", "javascript:checkConfirm()")
<script language=javascript>
function checkConfirm()
{
var res = confirm(''Do you really want to?'');
//user res
}
</script>
Ravikanth[MVP]
-----Original Message-----
All
Have searched the fields and hills for a good example butalass not a sausage have I found, well not quite!
I understand that you cannot have a msgbox and have come
up with the solution to use Javascript on the Onclick
Event.
Code:
DeleteBtn.Attributes.Add("onClick", "javascript:return
confirm(''Do you really want to?'');")
Now this is fine, works and gives me an OK and CANCEL
option, problem is how do I get a return value?
Cannot seem to find an answer to this anywhere!
Thanks
.
yop,
Try this out:
WebControlButton.Attributes.Add("onClick", "javascript:if(!confirm(''" &
MessageToDisplay & "'')) return false;")
Sincerely,
--
S. Justin Gengo, MCP
Web Developer
Free code library at:
www.aboutfortunate.com
"Out of chaos comes order."
Nietzche
"yop" <yo*@oceanfree.net> wrote in message
news:0a****************************@phx.gbl...All
Have searched the fields and hills for a good example but
alass not a sausage have I found, well not quite!
I understand that you cannot have a msgbox and have come
up with the solution to use Javascript on the Onclick
Event.
Code:
DeleteBtn.Attributes.Add("onClick", "javascript:return
confirm(''Do you really want to?'');")
Now this is fine, works and gives me an OK and CANCEL
option, problem is how do I get a return value?
Cannot seem to find an answer to this anywhere!
Thanks
这篇关于PopUp Message又名Msgbox的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!