jQuery清除Div中的值

Die*_*oP. 3 html jquery clear

我有一个包含许多输入文本的DIV.

我需要在jQuery 1.3.2中清除输入onclick中的所有值.

因此,当我点击特定链接时,将清除该DIV内输入的所有值.

我没有任何示例代码,我只需要知道是否有办法清除特定DIV内的所有输入值(不是在FORM中,而是在DIV中).

谢谢

mcg*_*ilm 7

就在这里

像这样的HTML

<div id="div_id">
    <input type="text" value="foo" />
    <input type="text" value="foo" />
    <input type="text" value="foo" />
    <input type="text" value="foo" />
</div>
Run Code Online (Sandbox Code Playgroud)

然后是jQuery

$('#div_id input[type="text"]').val('');
Run Code Online (Sandbox Code Playgroud)

工作演示