I can use javascript to display html tags and divs, but I want to put some text in a div.
this.buildDomModel(this.elements["pans"],
{ tag: "div", className: "panel",
id: "tabs",
childs: [
{ tag: "div", id: "page_button",
className: "box",
childs: [
{ tag: "div", className: "tab_left" },
{ tag: "div", className: "tab_middle",
{ tag: "div", className: "tab_right" }
]},
]
So how do I add text? I want to:
<div class="tab_title">Sample text</div>
will appear in my html in the div tag with the class name tab_middle.
How do I achieve this?
Also, if I create several of these “tablature titles” with sample text, how do I snap them to the center of the screen.
Many thanks. As you can tell, I am new to javascript. However, I have some basic html knowledge. Thank you for helping someone fight books all day.
source
share