problème avec getElementsByTagName
salut,
J'ai ce code mais ça ne fonctionne pas !!
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans nom</title>
<SCRIPT language=javascript>
var tables=document.getElementsByTagName("TABLE");
document.writeln("Il y a "+tables.length+" tableaux HTML dans cette page");
</SCRIPT>
</head>
<body>
<TABLE><tr><td></td></tr></TABLE>
<TABLE><tr><td></td></tr></TABLE>
</body>
</html> |
j'ai invariablement ceci que s'affiche !!
Code:
Il y a 0 tableaux HTML dans cette page
Est ce que quelqu'un voit ce qui cloche?