For example, if I use delegate () to bind an inputtext box (nameexp []) and multiple boxes appear, how can I remove duplicates? HTML {code...} js {code...} also has some inputtext boxes I dynamically add, which is why I use delegate () binding. The consequence of repetition is...
For example, I used delegate () to bind an input text box (name = exp []). How can I remove duplicates when multiple boxes appear?
HTML
'form-control','required'=>'required']) ?>
Js
$('p').delegate('input[name="ruleexp[]"]','blur',function(){ //code});
Some input text boxes are dynamically added, which is why I use delegate () binding.
The consequence of repetition is that I print out the input value and multiple results are displayed ..
Reply content:
For example, I used delegate () to bind an input text box (name = exp []). How can I remove duplicates when multiple boxes appear?
HTML
'form-control','required'=>'required']) ?>
Js
$('p').delegate('input[name="ruleexp[]"]','blur',function(){ //code});
Some input text boxes are dynamically added, which is why I use delegate () binding.
The consequence of repetition is that I print out the input value and multiple results are displayed ..
$ ('P '). undelegate (). delegate ('input [name = "ruleexp []"] ', 'blur', function () {// code.
Change delegate () to on (). In addition, you cannot clearly describe it because there is only one 'input [name = "ruleexp []"] ', you have multiple results, or because there are already multiple results, do you want to filter out one?