如何在jquery追加后访问INPUTS或任何ELEMNETS [英] How to access INPUTS or any ELEMNETS after append by jquery
本文介绍了如何在jquery追加后访问INPUTS或任何ELEMNETS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<div class="form">
<form class="myForm">
<!-- append here -->
</form>
</div>
JQUERY:
JQUERY :
$("button#add").click(function(){
var inputs = '<input type="" name="y[]" class="user">'+
'<input type="" name="x[]" class="email">';
$("form#myForm").append(inputs );
});
这个附加好了多个字段如何访问任何一个
: $(this)
我有什么试过:
如何通过Jquery追加INPUTS或任何ELEMNETS
this append well make a multiple fields how can i access any one
with : $(this)
What I have tried:
How to access INPUTS or any ELEMNETS After Append By Jquery
推荐答案
( button #add)。click( function (){
var inputs = ' < input type =name =y []class =user>' +
' < input type =name =x []class =email>';
("button#add").click(function(){ var inputs = '<input type="" name="y[]" class="user">'+ '<input type="" name="x[]" class="email">';
( form#myForm)。append(inputs);
});
("form#myForm").append(inputs ); });
这个附加好了多个字段我怎么能访问任何一个
:
this append well make a multiple fields how can i access any one
with :
(this)
我尝试过:
如何访问INPUTS或任何ELEMNETS之后追加Jquery
(this)
What I have tried:
How to access INPUTS or any ELEMNETS After Append By Jquery
这篇关于如何在jquery追加后访问INPUTS或任何ELEMNETS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文