假设//<---you want div c to append in thisb使用$('.a').append($('.c'));则会这样://<---you want div c to append in thisbc使用$('.a').prepend($('.c'));则结果这样://<---you want div c to append in thiscbafter()和before()同样的上述代码,使用$('.a').after($('.c'));结果:bc //<----this will be placed here使用$('.a').before($('.c'));结果:c //<----this will be placed hereb由上我们可以得出结论:append() & prepend()实在元素内插入内容(该内容变成该元素的子元素或节点),after() & before()是在元素的外面插入内容(其内容变成元素的兄弟节点)。