Awesomplete - get selected text
问题 Is there a straightforward way to get the text in an awesomplete field (https://leaverou.github.io/awesomplete/)? var input = document.getElementById("inputlist"); alert(input.value); shows NaN! 回答1: You need to add the event either awesomplete-select or awesomplete-selectcomplete In regular Javascript var input = document.getElementById("inputlist"); new Awesomplete(input, {list: yourlist}); document.getElementById('inputlist').addEventListener('awesomplete-selectcomplete',function(){ alert