插入一个或多个节点作为指定节点的第一个子节点。
noder.placeChildFirst(node, placing, copyByClone)
Example: 第三个p位置移动到第一个p前面。
<!DOCTYPE html> <html> <head> <style> </style> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.3/require.min.js"></script> <script> require.config({ baseUrl: "./", packages: [{ name: "skylark", location: "../../../src/skylark" }, ] }); </script> </head> <body> <p>one</p> <p>two</p> <p>three</p> <script> require(["skylark/finder", "skylark/noder"], function(finder, noder) { noder.placeChildFirst(finder.find("p:first"),finder.find("p:last")); }); </script> </body> </html>