我应该如何为未启用 JavaScript 的浏览器隐藏 HTML?我正在考虑类似以下的内容,但它不适用于我的 FF 浏览器,甚至无法验证。有什么想法吗?谢谢
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body class="wrap">
<noscript>
<h1>JavaScript is turned off in your web browser.<br />Turn it on to use this site, then refresh the page.</h1>
<style type="text/css">
body { display:none; }
noscript { display:block !important; }
</style>
</noscript>
HTML for JavaScript only browsers goes here...
</body>
</html>