Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您需要将内容放在选择标签内的选项标签中。
"<option>"+xmlhttp.responseText+"</option">;
或在 php 中:
$d = "<option>".$_GET['q']."</option">;
响应文本不是传入 onreadystatechange 回调吗?
xmlhttp.onreadystatechange = function (response){ // insert your method body here }