var selectObj = document.getElementById("prodnum")var showText = selectObj.options[selectObj.selectedIndex].text; 就行了