首页 > 技术文章 > 持续更新一些前端小知识点总结

aixuexi666888 2021-11-11 22:11 原文

<!--自动加载滚动条-->
<div style="height:100px;width:100px;overflow:auto;"></div>

<!--根据某小时的消息提示-->
<script>
var time=new Date();
var h=time.getHours();
if(h>=0&&h<=5){
document.write('该休息了,<br/>明天还要上班!');
}else if(h>5&&h<=8){
document.write('早上好!').style.color='red';
}else if(h>8&&h<=12){
document.write('上午好!').style.color='white';
}else if(h>12&&h<=18){
document.write('下午好!').style.blue;
}else if(h>18&&h<=23){
document.write('晚上好!').style.color='#fff000';
}else if(h>23&&h<=24){
document.write('该休息了,<br/>明天还要上班!').style.color='black';
}

</script>

<!-- qq联系我,需要先把qq设为在线状态 -->
<a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=8888888&site=qq&menu=yes" alt="联系我" title="call me" >

<img alt="QQ" src="http://wpa.qq.com/pa?p=1:8888888:4" border="0" /> 联系我</a>

推荐阅读