html - How do I create a new line in JavaScript? -



html - How do I create a new line in JavaScript? -

i have appended textbox div area. want goto new line in div after that, for loop prints column of textboxes instead of row.

i tried this:

<div id="timearea"> </div> var br = '<br/>'; br.appendto("#timearea");

however not work. code be?

you need create element using createelement() method append kid element using appendchild() method

var br = document.createelement("br"); document.getelementbyid("timearea").appendchild(br);

javascript html

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

c# - Can ProtoBuf-Net deserialize to a flat class? -

javascript - Change element in each JQuery tab to dynamically generated colors -