converting a javascript string to a html object
Posted
by Lina
on Stack Overflow
See other posts from Stack Overflow
or by Lina
Published on 2010-03-26T10:18:34Z
Indexed on
2010/03/26
10:23 UTC
Read the original article
Hit count: 373
JavaScript
|html
Hi everyone, can I convert a string to a html object? like:
string s = '<div id="myDiv"></div>';
var htmlObject = s.toHtmlObject;
so that i can later on get it by id and do some changing in its style
var ho = document.getElementById("myDiv").style.marginTop = something;
Thanx a million in advance, Lina
© Stack Overflow or respective owner