javascript 如何更改消息框标题?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15293393/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 00:15:01  来源:igfitidea点击:

How to change the message box title?

javascriptasp.net

提问by user2046904

enter image description here

在此处输入图片说明

How to change the title of this message box in asp.net?

如何在asp.net 中更改此消息框的标题?

this heading appears in IE.

这个标题出现在 IE 中。

Do Help...

帮忙...

回答by Quentin

You cannot. There is no API to do this and the default title is an anti-phishing security feature.

你不能。没有 API 可以执行此操作,默认标题是反网络钓鱼安全功能。

If you want that much control over the appearance of your alert messages, then you will have to build your own in the DOM instead of using native ones.

如果您想对警报消息的外观进行如此多的控制,那么您将不得不在 DOM 中构建自己的消息,而不是使用本机消息。

回答by Siamak A.Motlagh

You can't change javascript message box title. check this out:
How to edit a JavaScript alert box title?

I recommend you to use custom message box instead of alert();.
For example you can use some jquery plugins like:
Stylish JavaScript Dialog (Alert, Confirm, Prompt) Boxes
or
Dialog Jquery UI

您无法更改 javascript 消息框标题。看看这个:
如何编辑 JavaScript 警报框标题?

我建议您使用自定义消息框而不是alert();.
例如,您可以使用一些 jquery 插件,例如:
Stylish JavaScript Dialog (Alert, Confirm, Prompt) Boxes

Dialog Jquery UI

回答by Siamak A.Motlagh

Sigh...no you can't.

叹息……不,你不能。

Its a security/anti-phishing feature.

它是一个安全/反网络钓鱼功能。

More details

更多细节

see this

看到这个

and see this

看到这个

回答by PSR

You can't, this is determined by the browser, for the user's safety and security.If really want that use jQuery dialog boxes.

你不能,这是由浏览器决定的,为了用户的安全和保障。如果真的要使用jQuery对话框。