(1)web常见控件介绍
(2)js无鼠标键盘操作时跳转页面
<html> <head> <script type="text/javascript"> function screensaver(settings){ this.settings = settings; this.ntimeout = this.settings.timeout; document.body.screensaver = this; // link in to body events document.body.onmousemove = screensaver.prototype.onevent; document.body.onmousedown = screensaver.prototype.onevent; document.body.onkeydown = screensaver.prototype.onevent; document.body.onkeypress = screensaver.prototype.onevent; var pthis = this; var f = function(){pthis.timeout();} this.timerid = window.settimeout(f, this.ntimeout); } screensaver.prototype.timeout = function(){ if ( !this.saver ){ window.location = 'http://www.baidu.com'; } } screensaver.prototype.signal = function(){ if ( this.saver ){ this.saver.stop(); } window.cleartimeout(this.timerid); var pthis = this; var f = function(){pthis.timeout();} this.timerid = window.settimeout(f, this.ntimeout); } screensaver.prototype.onevent = function(e) { this.screensaver.signal(); } var saver; function initscreensaver(){ //blort; saver = new screensaver({timeout:5000}); } function window.onload(){ initscreensaver(); } </script> </head> <body> </p>5秒不动就跳转 </body> </html>
(3)css书写规范
https://www.cnblogs.com/lxb98117/p/w3c-norm.html
黄山市民网:https://www.huangshanshimin.com/