如何检测使用任何形状输入字段的更改 jQuery?

我使用以下代码片段来检测输入特定表单的字段中的每个更改。


$/ '#textbox' /.on/ 'input', function// {
// Do something here
}/;


此特定输入字段是指具有标志,交换机和其他字段输入字段的表单。 有没有办法确定任何表单字段的更改何时?
已邀请:

君笑尘

赞同来自:

尝试


$/'#Form input'/.on/ 'input', function// {
//This would be called if any of the input element has got a change inside the form
}/;

君笑尘

赞同来自:

试试吧:

HTML

:


<form>
<p><input type="text"/></p>
<p><input type="text"/></p>
<p><input type="checkbox"/></p>
</form>


JQuery

:


$/'form :input'/.change/function//{
alert/"Form changed"/;
}/;


http://jsfiddle.net/M7YFV/1/
-版本

涵秋

赞同来自:

$/"form :input"/.change/function// {

}/;

要回复问题请先登录注册