Version compl�te: jsB@nk » Image » Diaporama par le clavier
URL: https://www.javascriptbank.com/image-animation-by-keyboard.html
Pourquoi utiliser la graisse Gif-Animations si vous pouvez étonner vos visiteurs avec puce DHTML image axée sur les effets? Cet JavaScript s vous permet de piloter et de déplacer vos images par clavier.
Version compl�te: jsB@nk » Image » Diaporama par le clavier
URL: https://www.javascriptbank.com/image-animation-by-keyboard.html
<script language="Javascript" type="text/javascript"><!-- Hide script from old browsersmyPix = new Array("pic191.jpg","logojs.gif","photo1.jpg","photo2.jpg","photo3.jpg","photo4.jpg","photo5.jpg","photo6.jpg","photo7.jpg")thisPic = 0imgCt = myPix.length - 1document.onkeydown = keyHitif (document.layers) {document.captureEvents(Event.KEYDOWN)ltArrow = 28rtArrow = 29}else {ltArrow = 37rtArrow = 39}function keyHit(evt) {if (evt) {thisKey = evt.which}else {thisKey = window.event.keyCode}if (thisKey == ltArrow) {chgSlide(-1)}else if (thisKey == rtArrow) {chgSlide(1)}}function chgSlide(direction) {if (document.images) {thisPic = thisPic + directionif (thisPic > imgCt) {thisPic = 0}if (thisPic < 0) {thisPic = imgCt}document.myPicture.src=myPix[thisPic]}}// End hiding script from old browsers --></script><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<b>Use the right and left arrows on your keyboard to view the slideshow</b><br><img src="pic191.jpg" name="myPicture" alt="Slideshow"><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->