有没有简单的方法来更改地址栏背景?
我想更改 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
这是不可能的。如果网站改变地址栏的颜色并使其与文本字体的颜色相同,那会很烦人。
然而,如果您想区分当前环境,为什么不简单地为每个版本分配不同的 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.
在 Chrome 中,我使用具有不同主题的不同配置文件来区分两个不同的客户端。您只需要确保使用正确的浏览器来执行您想要执行的操作。
基本上,设置一个链接
您可以在 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
You can do the same thing in FireFox
一点也不。除了插件之外,浏览器几乎不会向任何东西公开这种 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.
改变身体背景可能更容易。我认为任何浏览器都不会让你这样做。
it's probably easier to change the body background instead. I don't think any browser would let you do that.
您可以使用 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>
我能想到的只有一种方法,它需要 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.