Today is the text value of the ComboBox to empty the problem of abuse, the following into the topic:
Md.drugView.cleanSearch = function () {
s = S1 = "";
Md.drugView.datagrid.datagrid (' Load ', {});//reload the data without reading the data, the value passed to the background is empty
Md.drugView.searchform.find (' input '). Val (');//Find all the input tags under the Searchform form and empty
};
The above is the way to empty the values in all the input tags in the form, so the problem is, when we're done with this method,
The value in input should be emptied, but when we use $ ("#sampleProvince_com"). ComboBox (' GetText ') gets the value of the text literal,
We will find that the value of input is still there, because we are emptying value, not text, in my personal understanding, the text will be buffered by the browser
, so if we just emptied the value of value, to empty the text value, we need to empty the text separately, using the jquery plugin's
The statement can be used in this sentence:
$ ("#sampleProvince_com"). ComboBox (' SetText ', "");
So you just need to add the sentence to solve the problem.
Md.drugView.cleanSearch = function () {
s = S1 = "";
$ ("#sampleProvince_com"). ComboBox (' SetText ', "");
Md.drugView.datagrid.datagrid (' Load ', {});//reload the data without reading the data, the value passed to the background is empty
Md.drugView.searchform.find (' input '). Val (');//Find all the input tags under the Searchform form and empty
};
Learn JS, the problem of emptying the text value of the combobox of the pit Daddy