Team:AITM-Nepal
From 2013.igem.org
(Difference between revisions)
Gmanandhar (Talk | contribs) |
Gmanandhar (Talk | contribs) |
||
Line 99: | Line 99: | ||
</style> | </style> | ||
+ | |||
+ | |||
+ | <script type="text/javascript"> | ||
+ | |||
+ | var number=0; | ||
+ | |||
+ | var img = new Array(3); | ||
+ | img[0] = new Image(); | ||
+ | img[0].src = "Images/image1.png"; | ||
+ | |||
+ | img[1] = new Image(); | ||
+ | img[1].src= "Images/image2.jpg"; | ||
+ | |||
+ | img[2] = new Image(); | ||
+ | img[2].src = "Images/image3.jpg"; | ||
+ | |||
+ | img[3] = new Image(); | ||
+ | img[3].src = "Images/image4.jpg"; | ||
+ | |||
+ | function onnextclick(){ | ||
+ | number ++; | ||
+ | if (number>3) | ||
+ | { | ||
+ | number=0; | ||
+ | } | ||
+ | document.slider.src = img[number].src; | ||
+ | } | ||
+ | |||
+ | function onpreviousclick(){ | ||
+ | number --; | ||
+ | if (number <0){ | ||
+ | number = 3; | ||
+ | } | ||
+ | document.slider.src= img[number].src; | ||
+ | } | ||
+ | |||
+ | var intervalId = setInterval(function(){ | ||
+ | |||
+ | number --; | ||
+ | if (number <0){ | ||
+ | number = 3; | ||
+ | } | ||
+ | document.slider.src= img[number].src; | ||
+ | |||
+ | }, 4000); | ||
+ | </script> | ||
+ | |||
</head> | </head> |
Revision as of 04:18, 21 August 2013
Welcome to Team AITM_Nepal's Wiki!