如何更改javascript功能框的按钮文字? [英] How to change the button text of javascript function box?

查看:86
本文介绍了如何更改javascript功能框的按钮文字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hii,





我有这个脚本..



Hii,


I have this script..

function ValidateStatus() {
            document.getElementById('<%=hdnStatus.ClientID %>').value = "";
            var sta = document.getElementById('<%=ddlStatus.ClientID %>').options[document.getElementById('<%=ddlStatus.ClientID %>').selectedIndex].text;
            if (sta == "Live") {
                if (document.getElementById('<%=hdnAddedBy.ClientID %>').value == document.getElementById('<%=hdnAddedFor.ClientID %>').value) {
                    if (confirm("Once this objective is saved as live it will be visible to all on the company home page.") == true) {
                        return true;
                        //document.getElementById('<%=hdnStatus.ClientID %>').value = "live";
                    }
                    else {
                        return false;
                        //document.getElementById('<%=hdnStatus.ClientID %>').value = "draft";
                    }
                }
            }
        }





默认情况下,确认框显示确定和取消按钮...如何更改它们以保存和取消...



by default the confirm box shows OK and Cancel buttons ... How can i change them to save and cancel ...

推荐答案

你不能,继续jQuery插件。例如 http://jqueryui.com/dialog/ [ ^ ]
You can't, go with jQuery plugins. For example http://jqueryui.com/dialog/[^]


不,无法更改确认功能显示的对话框中按钮的内容。您可以使用JavaScript创建看起来类似的对话框。但仍请查看它可以帮助你
No, it is not possible to change the content of the buttons in the dialog displayed by the confirm function. You can use JavaScript to create a dialog that looks similar. But still check this it may help you


你必须使用javascript / Jquery来完成它。检查以下链接并相应更改css以改变外观



http ://jsfiddle.net/Xtreu/ [ ^ ]



希望这会有所帮助。
You have to javascript/Jquery to accomplish that. Check the below link and may change the css accordingly to alter the look and feel

http://jsfiddle.net/Xtreu/[^]

Hope this helps.


这篇关于如何更改javascript功能框的按钮文字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆