简体   繁体   中英

Inserting a javascript var as markup with YUI2 insertAfter()

I'm trying to define an element in javascript as a string and then insert it. Have I defined it wrong, or is there another problem?

var NEW_ROW= '<TR class="NewRow"></TR>';
YAHOO.util.Dom.insertAfter(NEW_ROW, referenceNode);

It's reversed:

YAHOO.util.Dom.insertAfter(referenceNode, NEW_ROW);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM