Page 1 sur 1

erreur xhtml sur une pub

Publié : 21 déc. 2009, 17:32
par salamnavi
Bonjour,

je rencontre des erreurs xhtml sur une publicité mes je n'arrive pas à comprend !

Voici le code de la pub :

Code:

<script>
var links = new Array('<a href="http://www.yes-messenger.com/?id=44435& ... acker=bloc" onclick="window.open(this.href); return false;"><img src="http://www.sv2.biz/modules/cbsys/promo/ ... ></a>','<a href="http://www.yes-messenger.com/?id=44435& ... acker=bloc" onclick="window.open(this.href); return false;"><img src="http://www.sv2.biz/modules/cbsys/promo/ ... ></a>','<a href="http://www.yes-messenger.com/?id=44435& ... acker=bloc" onclick="window.open(this.href); return false;"><img src="http://www.sv2.biz/modules/cbsys/promo/ ... ></a>','<a href="http://www.yes-messenger.com/?id=44435& ... acker=bloc" onclick="window.open(this.href); return false;"><img src="http://www.sv2.biz/modules/cbsys/promo/ ... ></a>','<a href="http://www.yes-messenger.com/?id=44435& ... acker=bloc" onclick="window.open(this.href); return false;"><img src="http://www.sv2.biz/modules/cbsys/promo/ ... 1.gif"></a>');
var divObj= document.getElementById('J5X9');
divObj.innerHTML = links[Math.floor(Math.random()*links.length)];
</script>

Et l'erreur xhtml :

Error Line 48, Column 732: required attribute "alt" not specified.

…indow.open(this.href); return false;"><img src="http://www.sv2.biz/modules/cb

Cordialement,

Re: erreur xhtml sur une pub

Publié : 22 déc. 2009, 08:59
par calimo
Hello,
L'attribut alt est obligatoire pour l'élément img.
http://www.w3.org/TR/html4/struct/objects.html#edef-IMG
Le validateur te dit simplement que tu as oublié de le spécifier :wink: