Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要自动化(这是一个词吗?)在 html 中创建家谱。我对这门语言了解不多,所以我需要一个简单的代码(或它的指南)来允许我创建一个简单的家谱。只是基本的东西,比如一个人的姓名和出生日期的框和一个指向其亲属(孩子、父母和兄弟)的箭头。
正如automate这里使用的术语。我想您正在尝试创建 HTML 元素,而实际上没有在 HTML 页面中使用它。因此,这是一种您可以随后创建 HTML 和树结构的方法。
automate
var div = $("<div />") div.append("<div id='another' />") div.append("<div id='next' />") div.appendTo($('body'));
这将创建一个 div,将另外两个 div 放入其中,并附加在 body 标记中。