如何使用关闭按钮显示警报消息? [英] How to display alert message with close button?
本文介绍了如何使用关闭按钮显示警报消息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果用户在其浏览器上禁用了javascript,是否有任何方法可以显示警告消息。它应该有像youtube网站一样的关闭按钮。
Is there any way to display a alert message if user has disabled javascript on his browser. It should have close button like in youtube website.
推荐答案
你不能显示警告框,但你可以通过在JavaScript不存在时更改样式来做类似的事情。这样的事情:
You can not show the alert box but you can do something similar by changing the style when JavaScript is not present. Something like this:
<noscript>
<style type="text/css">
#body {display:none;}
#alert {display:inline;}
</style>
</noscript>
这篇关于如何使用关闭按钮显示警报消息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文