首页 > 编程 > JavaScript > 正文

键盘上一张下一张兼容IE/google/firefox等浏览器

2019-11-20 21:11:07
字体:
来源:转载
供稿:网友
复制代码 代码如下:

< script language = "javascript" >
document.onkeydown = chang_page;
function chang_page(event) {
var event = event ? event : (window.event ? window.event : null);
var key = event.keyCode || event.which;
if (key == 37 || key == 33)
location = '';
if (key == 39 || key == 34)
location = '';
}
< / script >

兼容IE,google,firefox的键盘上一张下一张
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表