Débuts avec Jquery et 1er problème
Bonjour à toutes et à tous
Le code suivant ne fonctionne pas : Sur un clic, pas de message "Oune click" :(
J'utilise Chrome.
Peut-on m'envoyer au coin avec un rapport circonstancié ?
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Hello World</title>
</head>
<body>
<div id="tout">
<hr>
Ce texte est affiché en HTML
<hr>
<span id="texteJQ"></span>
<!-- <script src="http://code.jquery.com/jquery.js"></script> -->
<script src="jquery/jquery-3.0.0.js"></script>
<script>
$(function(){
// $('#texteJQ').html('<br>Hello world. Ce texte est affiché par jQuery.');
$('div').on('click', function() {Alert("Oune click");
});
});
alert("????");
</script>
</div>
</body>
</html> |