Voici un code d'exemple pour illustrer :
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 <div id='1' class='chapter'> <div class='chap_title'> <?php if ( $unevar = true ) { ?> <a href="#"> test1 </a> <?php } else { ?> test2 <?php } ?> <div id='2' class='chapter'> <div class='chap_title'> <?php if ( $unevar = true ) { ?> <a href="#"> test3 </a> <?php } else { ?> test4 <?php } ?>
Je me trouve devant ce problème, depuis l'ID, j'aurai aimé récupérer la valeur test1/2/3/4 en javascript mais je n'y arrive pas :/
Partager