//Modify the text of value="paraValue" in the select option to "paraText" function jsUpdateItemToSelect(objSelect,objItemText,objItemValue) { //Judge whether it exists if(jsSelectIsExitItem(objSelect,objItemValue)) { for(var i=0;i< ;objSelect.options.length;i ) { if(objSelect.options[i].value == objItemValue) { objSelect.options[i].text = objItemText; break; } } alert("Successfully modified"); } else { alert("This item does not exist in the selection"); } }
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn