有没有简单的方法来更改地址栏背景?

发布于 2024-11-25 13:00:56 字数 118 浏览 5 评论 0原文

我想更改 Firefox 或 Internet Explorer 中的地址栏背景以指示我正在运行测试应用程序或实时应用程序的天气。有没有简单的方法可以使用 HTML、Javascript 或 ASP.NET 来做到这一点?

I would like to change the address bar background in either Firefox or Internet Explorer to indicate weather I am running the test application or the live. Is there any easy way to do it using HTML, Javascript or ASP.NET ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

梦开始←不甜 2024-12-02 13:00:57

这是不可能的。如果网站改变地址栏的颜色并使其与文本字体的颜色相同,那会很烦人。

然而,如果您想区分当前环境,为什么不简单地为每个版本分配不同的 Favicon。

This is not possible. it would be annoying if the website changes the color of your address bar and make it the same color of the text font.

How ever if you want to distinguish your current environment, why don't you simply assign a different Favicon for each versions.

尘世孤行 2024-12-02 13:00:57

在 Chrome 中,我使用具有不同主题的不同配置文件来区分两个不同的客户端。您只需要确保使用正确的浏览器来执行您想要执行的操作。

基本上,设置一个链接

chrome.exe --user-data-dir=[配置文件目录]

您可以在 FireFox 中执行相同的操作

In Chrome, I use different profiles with different themes to distinguish between two different clients. You just need to make sure to use the correct browser for what you're trying to do.

basically, set up a link to

chrome.exe --user-data-dir=[profile dir]

You can do the same thing in FireFox

幻梦 2024-12-02 13:00:57

一点也不。除了插件之外,浏览器几乎不会向任何东西公开这种 UI。我建议根据应用程序的测试/生产版本对页面上的元素进行不同的着色。

Not at all. Browsers don’t expose that kind of UI to pretty much anything except plug-ins. I'd recommend just coloring an element on the page differently depending on the test/production version of the app.

爱,才寂寞 2024-12-02 13:00:57

改变身体背景可能更容易。我认为任何浏览器都不会让你这样做。

it's probably easier to change the body background instead. I don't think any browser would let you do that.

岁月无声 2024-12-02 13:00:57

您可以使用 web.config 设置在 Web 应用程序本身中添加一些内容吗?

<头>

--- 生产环境 ---

在此处输入图像描述

Can you just put something in the web application itself by using a web.config setting?

<html>
<head>
</head>
<body style="margin:0px 0px 0px 0px;">
<div style="width:100%; top:50px; background-color:red; text-align:center;">--- Production Environment ---</div>
</body>
</html>

enter image description here

恬淡成诗 2024-12-02 13:00:57

我能想到的只有一种方法,它需要 HTTPS。大多数浏览器现在都有 3 层证书:来自受信任机构的标准证书、自签名证书和扩展验证 。如果您使用不同的类型进行测试和实时,地址栏看起来会有所不同。

There is only 1 way I can think of and it requires HTTPS. Most browsers now have 3 tiers of certificates: standard from a trusted authority, self signed, and Extended Validation. If you use different types for testing and live, the address bar will look different.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文