<input type="hidden" id="startTimezh" value="2022/11/30 22:20:56">
<input type="hidden" id="endTimezh" value="2022/12/05 22:20:56">
<script type="text/javascript">
$(function (){
var startTime = $("#startTimezh").val();
var endTime = $("#endTimezh").val();
if(checkedDate(startTime,endTime)){
getCss();
}
})
function checkedDate(beginStr,endStr){
var curDate = new Date(),
beginDate = new Date(beginStr),
endDate = new Date(endStr);
if(curDate>= beginDate && curDate <= endDate){
return true;
}
return false;
}
function getCss(){
$("html").css({
'-webkit-filter':'grayscale(100%)',
'-moz-filter': 'grayscale(100%)',
'-ms-filter': 'grayscale(100%)',
'-o-filter': 'grayscale(100%)',
'filter':'progid:DXImageTransform.Microsoft.BasicImage(grayscale=1)',
'_filter':'none'
})
}
</script>
网站定时置灰,css滤镜
最新推荐文章于 2024-10-02 05:39:15 发布