我有一个包含可变长度文本的 div
<div id="paragraph">
blah blah blah <em>Something Important</em> more blah
</div>
我想在<div id="buttons">上面动态附加另一个包含两个按钮的按钮,这<div id="buttons">应该始终右对齐并内联显示在包含的<div id="paragraph">. 例如,它可能看起来像
This is a paragraph, and part of it are two buttons that should always align right at the end. [button1][button2]
如何<div id="buttons">在 JavaScript 或 JQuery 中执行附加部分?