dev7
Guest
|
How would you make the contents of a variable in JS show up as an ID in say a span. I was thinking..
<span id="sId"></span>
<script> var test = "content" test.Id = "sId" </script>
|
|
|
|
docucument.getElementById("sId").innerHTML = test;
|
|
|
|
dev7
Guest
|
Docucument lol. I'll try that. Doesn't work.
Last Edit: Sept 9, 2006 1:20:25 GMT by dev7
|
|
|
|
Yeah, ignore my typo. <span id="sId"></span> <script> var test = "whee"; document.getElementById("sId").innerHTML = test; </script> That should work fine.
|
|
|
|
dev7
Guest
|
Yep, it gives me ideas too. Thanks
|
|
|