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.
我有以下代码,您可以看到我正在尝试做的是在表单中添加表单代码,但是由于表单更改了 ID,我想使用closest();
closest();
$("#contentarea").closest("form").html("some code");
演示 http://jsfiddle.net/zQC2Q/
如果您在演示的左侧面板中选择 jQuery,您的代码将有效:
http://jsfiddle.net/Paulpro/zQC2Q/3/
你把它作为 Mootools 留下了