【发布时间】:2018-11-28 09:02:09
【问题描述】:
我必须移动输入元素。在变量测试中,我得到了很好的元素:
var test = $('#AttributeValue_StringRepresentation').parent('td');
但我不知道如何使用 appendChild,我试过了:
test.appenChild(document.getElementById(AttributeValueId));
test[0].appenChild(document.getElementById(AttributeValueId));
我也试过了
document.getElementsByName(test)[0].appenChild(document.getElementById(AttributeValueId));
通常我的想法已经完成,我找到了一些解决方案,但它现在正在工作。我没有测试变量的 ID 或任何东西,我被卡住了
【问题讨论】:
-
test[0].appenChild(document.getElementById(AttributeValueId));应该可以工作,但是你使用.append()即test.append(document.getElementById(AttributeValueId)) -
appenChild !== appendChild
标签: javascript jquery model-view-controller kendo-ui