<legend id='JnRVP'><style id='JnRVP'><dir id='JnRVP'><q id='JnRVP'></q></dir></style></legend>
      <bdo id='JnRVP'></bdo><ul id='JnRVP'></ul>
    <i id='JnRVP'><tr id='JnRVP'><dt id='JnRVP'><q id='JnRVP'><span id='JnRVP'><b id='JnRVP'><form id='JnRVP'><ins id='JnRVP'></ins><ul id='JnRVP'></ul><sub id='JnRVP'></sub></form><legend id='JnRVP'></legend><bdo id='JnRVP'><pre id='JnRVP'><center id='JnRVP'></center></pre></bdo></b><th id='JnRVP'></th></span></q></dt></tr></i><div id='JnRVP'><tfoot id='JnRVP'></tfoot><dl id='JnRVP'><fieldset id='JnRVP'></fieldset></dl></div>
  1. <small id='JnRVP'></small><noframes id='JnRVP'>

      <tfoot id='JnRVP'></tfoot>

    1. Javascript 确认弹出窗口是,否按钮而不是确定和取消

      时间:2023-10-02
      <tfoot id='9pLSW'></tfoot>
      1. <legend id='9pLSW'><style id='9pLSW'><dir id='9pLSW'><q id='9pLSW'></q></dir></style></legend>
          <bdo id='9pLSW'></bdo><ul id='9pLSW'></ul>

                <tbody id='9pLSW'></tbody>
            1. <small id='9pLSW'></small><noframes id='9pLSW'>

              <i id='9pLSW'><tr id='9pLSW'><dt id='9pLSW'><q id='9pLSW'><span id='9pLSW'><b id='9pLSW'><form id='9pLSW'><ins id='9pLSW'></ins><ul id='9pLSW'></ul><sub id='9pLSW'></sub></form><legend id='9pLSW'></legend><bdo id='9pLSW'><pre id='9pLSW'><center id='9pLSW'></center></pre></bdo></b><th id='9pLSW'></th></span></q></dt></tr></i><div id='9pLSW'><tfoot id='9pLSW'></tfoot><dl id='9pLSW'><fieldset id='9pLSW'></fieldset></dl></div>

                本文介绍了Javascript 确认弹出窗口是,否按钮而不是确定和取消的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                Javascript Confirm 弹出窗口,我想显示 Yes, No 按钮而不是 OK 和 Cancel.

                Javascript Confirm popup, I want to show Yes, No button instead of OK and Cancel.

                我用过这个vbscript代码:

                I have used this vbscript code:

                <script language="javascript">
                    function window.confirm(str) {
                        execScript('n = msgbox("' + str + '","4132")', "vbscript");
                        return (n == 6);
                    }
                </script>
                

                这仅适用于 IE,在 FF 和 Chrome 中,它不起作用.

                this only works in IE, In FF and Chrome, it doesn't work.

                是否有任何解决方法可以在 Javascript 中实现这一点?

                Is there any workround to achieve this in Javascript?

                我还想更改弹出窗口的标题,例如在 IE 中显示Windows Internet Explorer",我想在此处显示我自己的应用程序名称.

                I also want to change the title of popup like in IE 'Windows Internet Explorer' is shown, I want to show here my own application name.

                推荐答案

                不幸的是,没有跨浏览器支持打开不是默认确定/取消对的确认对话框.您提供的解决方案使用的是 VBScript,它只在 IE 中可用.

                Unfortunately, there is no cross-browser support for opening a confirmation dialog that is not the default OK/Cancel pair. The solution you provided uses VBScript, which is only available in IE.

                我建议使用可以构建基于 DOM 的对话框的 Javascript 库.试用 Jquery 用户界面:http://jqueryui.com/

                I would suggest using a Javascript library that can build a DOM-based dialog instead. Try Jquery UI: http://jqueryui.com/

                这篇关于Javascript 确认弹出窗口是,否按钮而不是确定和取消的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:在 WebStorm 中更改自动导入格式 下一篇:在新窗口中打开页面而不阻止弹出窗口

                相关文章

              • <small id='jRw2s'></small><noframes id='jRw2s'>

                <tfoot id='jRw2s'></tfoot>

              • <i id='jRw2s'><tr id='jRw2s'><dt id='jRw2s'><q id='jRw2s'><span id='jRw2s'><b id='jRw2s'><form id='jRw2s'><ins id='jRw2s'></ins><ul id='jRw2s'></ul><sub id='jRw2s'></sub></form><legend id='jRw2s'></legend><bdo id='jRw2s'><pre id='jRw2s'><center id='jRw2s'></center></pre></bdo></b><th id='jRw2s'></th></span></q></dt></tr></i><div id='jRw2s'><tfoot id='jRw2s'></tfoot><dl id='jRw2s'><fieldset id='jRw2s'></fieldset></dl></div>

                  <legend id='jRw2s'><style id='jRw2s'><dir id='jRw2s'><q id='jRw2s'></q></dir></style></legend>
                    <bdo id='jRw2s'></bdo><ul id='jRw2s'></ul>