Home > front end >  Minus the same as another variable element???????
Minus the same as another variable element???????

Time:09-25

If I want to let d and s is variable, depending on the value of the execution of different comparison, how to do? Variable js d or s, such as
<%
Dim myVBArray
MyVBArray=request form (" q ")
% & gt;
Var js='& lt; % %=myVBArray & gt; ';
Var c=,2,5,3,6 [1];
Var d=[3, 6];
Var s=,2,5 [1];
The function the array_diff (a, b) {
For (var I=0; i For (var j=0; J & lt; a.length; J++) {
If (a==b [j] [I]) {
A.s plice (m, 1);
J=j - 1;
}
}
}
return a;
}
Start. The onclick=function () {
The array_diff (c, js);
Document. The getElementById (" s "). InnerHTML=a;
}

CodePudding user response:

Didn't understand what you mean

CodePudding user response:

Is according to the submission form, the different of the same element in an array

CodePudding user response:

The d s do you use?

CodePudding user response:

Such as the form submission is d, minus the same as the d array elements, if s is minus the same as the s array elements,

CodePudding user response:

The array_diff (c, window [js]);
Document. The getElementById (" s "). InnerHTML=c;
  • Related