티스토리 뷰


var x = document.getElementByID('fromID');
document.getElementByID('toID').insertAdjacentHTML('afterbegin',x.innerHTML);

HTML DOM className Property


http://www.w3schools.com/jsref/prop_html_classname.asp



element.insertAdjacentHTML(position, text);

'beforebegin' 

Before the element itself.


'afterbegin' 

Just inside the element, before its first child.


'beforeend' 

Just inside the element, after its last child.


'afterend' 

After the element itself.



https://developer.mozilla.org/ko/docs/Web/API/Element/insertAdjacentHTML

댓글
댓글쓰기 폼