<html>
<head></head
<body>
<noscript>
<style type="text/css">
body{
display:none!important;
}
</style>
</noscript>
<header></header>
<div class="container">
<p>actual body starts from here, if javascript enabled, it will display.</p>
</div>
<footer></footer>
</body>
</html>
我在 stackoverflow 中没有任何声誉来回答这个问题。所以,我创建了这个问题并回答了。它适用于任何应用程序 java、dotnet、php 等,谢谢。
回答1
<html>
<head></head
<body>
<noscript>
<style type="text/css">
body{
display:none!important;
}
</style>
</noscript>
<header></header>
<div class="container">
<p>actual body starts from here, if javascript enabled, it will display.</p>
</div>
<footer></footer>
</body>
</html>