Ajoute ou modifie un attribut du noeud courant du document HTML.
hDoc est un htmlDocument = "
<html>
<head/>
<body>
<h2><span>
<p>Texte</p>
</span></h2><h3><div></div><span></span></h3>
</body>
</html>
"
hNoeud est un htmlNoeud
hNoeudRecherche est un tableau de htmlNoeuds <- HTMLChercheElémentParBalise(hDoc, "h3")
hNoeud <- hNoeudRecherche[1]
HTMLModifieAttribut(hNoeud, "id")
// body : <h2><span><p>Texte</p></span></h2><h3 id><div></div><span></span></h3>
HTMLModifieAttribut(hNoeud, "id", "h3")
// body : <h2><span><p>Texte</p></span></h2><h3 id="h3"><div></div><span></span></h3>
HTMLSupprimeAttribut(hNoeud, "id")
// body : <h2><span><p>Texte</p></span></h2><h3><div></div><span></span></h3>
Syntaxe
HTMLModifieAttribut(<Noeud source> , <Attribut> [, <Valeur>])
<Noeud source> : Variable de type htmlNoeud
Nom de la variable de type htmlNoeud correspondant au noeud de référence pour la modification de l'attribut.
<Attribut> : Variable de type htmlAttribut ou chaîne de caractères
Attribut à modifier. Cet attribut peut correspondre : - à une variable de type htmlAttribut.
- à une chaîne de caractères correspondant à l'attribut à modifier.
Si cet attribut n'existe pas, il sera créé.
<Valeur> : Variant optionnel
Nouvelle valeur de l'attribut. Si ce paramètre n'est pas précisé, l'attribut est créé sans valeur.
Classification Métier / UI : Code métier
Composante : wd280html.dll