?? script.js
字號:
document.onkeydown = keyHit;var thisPic = 0;function keyHit(evt) { var myPix = new Array("images/callisto.jpg","images/europa.jpg","images/io.jpg","images/ganymede.jpg"); var imgCt = myPix.length-1; var ltArrow = 37; var rtArrow = 39; var thisKey; if (evt) { thisKey = evt.which; } else { thisKey = window.event.keyCode; } if (thisKey == ltArrow) { chgSlide(-1); } else { if (thisKey == rtArrow) { chgSlide(1); } } return false; function chgSlide(direction) { thisPic = thisPic + direction; if (thisPic > imgCt) { thisPic = 0; } if (thisPic < 0) { thisPic = imgCt; } document.getElementById("myPicture").src = myPix[thisPic]; }}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -