Bonjour,
j'ai une fonction pour afficher une vignette.
Je voudrais passer certains paramètres en variable comme le background-color.
Je n'arive pas a trouver l'écriture correct dans la fonction si je passe "fond" en variable dans la fonction. Avez vous une tite idée ?
function CreatElem(Id, Longueur, Fond, Message)
{
var opacite=100;
var MonStyle = "STYLE='{filter:alpha(opacity="+ opacite +"); border-color: #cc0000; background-color:#FFFF00 "
MonStyle += (Longueur == 0)? "'}" : Longueur + "'}";
document.write("<DIV width='" + Longueur + "' ID='" + Id + "' " + MonStyle + ">" + Message+ "</DIV>");
}
Partager