admin管理员组文章数量:1313599
I have to display yes/no button on some condition on my asp page , I used windows.confirm() to display that but windows.confirm displays Ok/Cancel Button , Is there any way I can display Yes/No Button in asp page instead of Ok/Cancel using Javascript ?
I have to display yes/no button on some condition on my asp page , I used windows.confirm() to display that but windows.confirm displays Ok/Cancel Button , Is there any way I can display Yes/No Button in asp page instead of Ok/Cancel using Javascript ?
Share Improve this question edited Apr 11, 2013 at 18:39 user1131435 asked Jan 2, 2009 at 21:17 RBSRBS 3,85111 gold badges37 silver badges33 bronze badges 1- stackoverflow./questions/391143/… – Andreas Grech Commented Jan 2, 2009 at 21:56
6 Answers
Reset to default 5If you want to keep it simple, just check some of the jQuery or YUI plugins, you can get that up and running with a couple of lines of code.
For example, this one uses jQuery and this one uses YUI.
http://bytes./groups/javascript/149838-yes-no-dialog-box-javascript
Read there :)
You cannot change the button text on a JavaScript alert, and while you can't change them on a VBScript message box, it has different text. How I got around this was to develop a custom div that contains buttons with the correct text on them that is displayed using absolute positioning and a shadow effect to give the appearance of a message box.
not cross browser without creating an custom modal dialong or using one that is already built. if you can use ms ajax then it has a modal you can use.
You can't do it using prompt, you can show a hidden div with html controls and javascript wired up to buttons. When you want to ask the question show the previously hidden div.
Try this.
JS code: `if(confirm('Are you sure???')){ {
}else{
}`
本文标签: How to display YesNo Button in aspnet page using JavascriptStack Overflow
版权声明:本文标题:How to display YesNo Button in asp.net page using Javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741932446a2405653.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论