I need to set an arbitrary style to a span via javascript.
I know I can do things like: span.style.height="250px"
;
But I need to be able to insert a random full style definition from a template
for example
float:left;
text-decoration:underline;
cursor:pointer;
color:blue;
Is there a way to do that in Javascript? Something like:
element.style="all style definition here";
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…