Stuck on a slideshow

Hi, i don’t know if i’m posting this in the good category but, i’m stuck on a slideshow, console says :

"index2.html:16 Uncaught ReferenceError: affiche is not defined
at HTMLImageElement.onclick (index2.html:16)
onclick @ index2.html:16"

Pls Halp.

<!DOCTYPE html>
	<link rel="stylesheet" href="../assets/css/styles2.css">
	<script type="JavaScript">
		i = 1;
		function affiche(numero) {
		i = numero;
  		img.src = i+'.jpg';
	<p class="Content">
		<img name="img" class="Contentelse" src="C:/Users/Flori/Pictures/Posters/Artorias.jpg" OnClick="affiche(i+1)">

Try defining affiche in a different notation:

var affiche = function(numero){
  i = numero;
  img.src = i+'.jpg';
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.