var obj = document.getElementById ("mySelect"); var index = obj.selectedIndex; obj.options[index] = new Option("three",3); //Change the corresponding value obj.options[index ].selected = true; //Keep selected
$("# mySelect").change(function(){ //Add the operation code that needs to be executed })
Statement:
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