html成人内容警告代码
来自https://mr-z.me/2018/11/wordpress-adult-contents-warning-code-update.html扒下来的,直接看效果。
<html>
<head>
<title>成人内容警告</title>
<meta name="description" content="">
<meta name="keywords" content="">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
</head>
<style type="text/css">
a{text-decoration:none;color:#0000FF}
a:hover{text-decoration:underline;}
</style>
<body bgcolor="#FFFFFF" text="#000000">
<p align="center"><font color="#FF0000"><b>警告 / WARNING </b><br>
</font><br>
本物品內容可能令人反感;不可將本物品內容派發,傳閱,出售,出租,交給<br>或出借予年齡未滿 18 歲的人士出示,播放或播映。<br>
<br>
<font size="1" face="Verdana">This article contains material which may offernd and may not be distributed, circulated, sold, hired, given, lent, shown, <br>
played or projected to a person under the age of 18 years. All models are 18 or older. </font><br>
</p>
<p align="center">
<b>
<font size="7" face="Verdana">
<a href="javascript::" id="confirm">__ 滿 18 歲,請按此 __</a></font></b><BR><BR>
<a href="javascript:" id="close">退出浏览</a>
</p>
<script>
jQuery(document).ready(function($) {
$("#confirm").click(function(){
var name = 'isAdult';
var value = 'yes';
var exp = new Date();
exp.setTime(exp.getTime() + 1*24*60*60*1000); //设置过期时间为一天
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
document.location.reload();
});
$("#close").click(function(){
if(window.history.go(-1) == undefined){
window.location.href="about:blank";
}
else{
window.history.go(-1);
}
});
});
</script>
</body></html>