I will try to expand my problem:
I have a link:
<a href="#" onClick="Display(); return false;">Display</a>
I have some styles:
<style type="text/css">
p {
background-color: #AFA99B;
}
</style>
And the folowing js code:
function printf(MyHtml){
document.write(MyHtml);
}
function Display(){
printf("<p>some html code<p>");
//...
}
So when the user click the link, I must add some html content to the body & the new added elements must use the styles defined. That's all.
` tag?
– calebds Jan 24 '12 at 17:53