Home >Web Front-end >HTML Tutorial >Mouse clicks and keyboard clicks automatically jump to the page_html/css_WEB-ITnose
$(function(){
var i = 0;
document.onmousedown=function(event){
if(i==1){
window.open('http: //www.njxblog.com');
}
//setTimeout(function (){window.open('http://www.njxblog.com')},2000); //The timing is not It works so well that it will be regarded as an advertisement by the browser
i ;
};
var j = 0;
document.onkeydown=function(event){
if(j==1 ){
window.open('http://www.njxblog.com');
}
//setTimeout(function (){window.open('http://www.njxblog. com')},2000); // Timing is not easy to use and will be regarded as advertising by the browser
j ;
};
});
(reposted from : Koike Programming’s blog)