<script>
var listName = document.getElementById('list-name-for-select');
var listSelect = document.getElementById('list-select').onchange = function(e){
console.log(this)
if(this.value){
listName.value = this.value + ' | ' + this.options[this.selectedIndex].text;
}else{
listName.value = ''
}
};
</script>
</body>
</html>
您可能感兴趣的文章: