我提交了一个Firefox插件给Mozilla目录,却遭到了拒绝,因为这样的:的JavaScript,DOM:使用appendChild和的textContent
item.innerHTML = '<table style="border-collapse: collapse; width: 100%;">'
+ '<tr><td style="line-height: inherit; padding: 0pt; width: 100%;">'
+ word.title
+ '</td></tr>'
+ '</table>';
我跟编辑,他告诉我“use a text node and then insert it using appendChild, textContent, etc
”
这听起来像对我来说总是乱码,我从来没有使用过TextContent, appendChild
等,有点失落。你能告诉我如何做到以上几点,我将在脚本中编辑其他13个我有类似上述内容的实例吗?
谢谢!
他拒绝了它,因为它可以使用这种技术注入HTML代码。 – Pindatjuh
我知道,那是他告诉我的......我知道他为什么拒绝它,但不知道如何使用他告诉我使用的其他东西。虽然这似乎有点有用:http://stackoverflow.com/questions/2962137/adding-new-elements-into-dom-using-javascript-appendchild – Ryan