<body>
<form name="saerch-forms">
<input type="text" name="search-input" id="inputs"><input type="submit" value="提交" name="submit">
</form>
<ul id="list"></ul>
<script>
var oList = document.getElementById('list');
function callBack(data){
console.log(data);
oList.innerHTML = '';
data.s.forEach(v =>{
var oLi = document.createElement('li');
oLi.innerHTML = v;
oList.appendChild(oLi);
})
};
//
var oForm = document.forms['saerch-forms'];
var oContent =oForm.elements['search-input'];
oContent.onpropertychange = oContent.oninput = function(){
console.log(this.value);
var oScript = document.createElement('script');
oScript.src = 'https://sp0.baidu.com/5a1Fazu8AA54nxGko9WTAnF6hhy/su?wd='+this.value+'&json=1&p=3&sid=26522_1468_21081_28205_28132_28266_28140&req=2&csor=1&cb=callBack&_=1551355898659'
document.body.appendChild(oScript);
document.body.removeChild(oScript);
};
</script>
</body>