JS Monitor mouse click (onmousedown) and keyboard click (onkeydown) events and automatically jump page, in the study of Friends can refer to the
$ (function () {
var i = 0;
Document.onmousedown=function (event) {
if (i==1) {
window.open (' http://www.njxblog.com ');
}
settimeout (function () {window.open (' http://www.jb51.net ')},2000); Timing is not very good, will be the browser as advertising
i++;
var j = 0;
Document.onkeydown=function (event) {
if (j==1) {
window.open (' http://www.njxblog.com ');
}
settimeout (function () {window.open (' http://www.jb51.net ')},2000); Timing is not very good, will be the browser as the advertisement for
J + +;};
PS: Here again for you to recommend a JS event on the online query tool, summed up JS commonly used event types and function functions:
JavaScript event and Feature description encyclopedia:
Http://tools.jb51.net/table/javascript_event