Home > front end >  Pan micro e - cology8 cell according to the field values change color
Pan micro e - cology8 cell according to the field values change color

Time:10-01

Such as topic, the current implementation is submitted if the value is not equal to 0 will cell fill in yellow, but want to achieve is, need not submit, directly determine the value of a field, change the cell color is not equal to zero, don't know how to write

 & lt; ! - the script code, if you need any reference js file, please use the HTML in the same way, - & gt; 
JQuery (document). Ready (function () {
CheckCustomize=function () {
Var ret=true;
If (ret) {
Var a1=jQuery (" # field12015 "). Val ();
If (a1=0) {
Ret=true;
} else {

JQuery (" # field12015 "). The CSS (' background - color ', 'yellow');
Ret=false;
}

return ret;
}
};
});

</script>

CodePudding user response:

For listening text box change
 
JQuery (document). Ready (function () {
JQuery (" # field12015 "). BindPropertyChange (function () {
Var a1=jQuery (" # field12015 "). Val ();
The if () {
.
} else {
.
}
});
});

CodePudding user response:

reference 1st floor Clinging_white response:
for listening text box change
 
JQuery (document). Ready (function () {
JQuery (" # field12015 "). BindPropertyChange (function () {
Var a1=jQuery (" # field12015 "). Val ();
The if () {
.
} else {
.
}
});
});


Seems useless (I put "checkCustomize=function () {changed to" jQuery "(" # field12015"). BindPropertyChange (function () {") then my schedule of 12015 is fields, whether have influence

CodePudding user response:

refer to the second floor qixifeifei response:
Quote: refer to 1st floor Clinging_white response:

For listening text box change
 
JQuery (document). Ready (function () {
JQuery (" # field12015 "). BindPropertyChange (function () {
Var a1=jQuery (" # field12015 "). Val ();
The if () {
.
} else {
.
}
});
});


Seems useless (I put "checkCustomize=function () {changed to" jQuery "(" # field12015"). BindPropertyChange (function () {") then my schedule of 12015 is fields, whether there is influence


List must not
1. The first page to initialize the complete list to see if there is data
Schedule of 2. If the data after the completion of a page to initialize the new this is definitely not listen if list id nor is this the first line of the jQuery (" # field12015_0 ") behind each row are increasing

CodePudding user response:

reference Clinging_white reply: 3/f
Quote: refer to the second floor qixifeifei response:

Quote: refer to 1st floor Clinging_white response:

For listening text box change
 
JQuery (document). Ready (function () {
JQuery (" # field12015 "). BindPropertyChange (function () {
Var a1=jQuery (" # field12015 "). Val ();
The if () {
.
} else {
.
}
});
});


Seems useless (I put "checkCustomize=function () {changed to" jQuery "(" # field12015"). BindPropertyChange (function () {") then my schedule of 12015 is fields, whether there is influence


List must not
1. The first page to initialize the complete list to see if there is data
Schedule of 2. If the data after the completion of a page to initialize the new this is definitely not listen if list id nor is this the first line of the jQuery (" # field12015_0 ") behind each incremental


The main table also not line, I tried

CodePudding user response:

The main table can't ah, must hold the console information about this for a detailed id check, it's convenient for the remote

CodePudding user response:

reference 5 floor Clinging_white reply:
the main table can't ah, must hold the console information about this for a detailed id check, it's convenient for remote

Can you send a full, I put the main table list is there any way of xfaizz weixin is this number

CodePudding user response:

Finally realized? Don't submit, directly determine the field value, is not equal to 0 will change the cell color, whether the main table or fine tables?
  • Related