Home >Web Front-end >HTML Tutorial >Mouse clicks and keyboard clicks automatically jump to the page_html/css_WEB-ITnose

Mouse clicks and keyboard clicks automatically jump to the page_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:57:221931browse

$(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)

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn