jQuery自动完成结果定位

我正在尝试将自动完成的结果放入div。当前,结果浮动在页面的左上角。我需要将结果显示在输入搜索框的正下方。请帮忙。

<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.10.1/jquery-ui.min.js"></script>
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
</head>
<body>
<div style="background-color:blue;float:right;">
<p><label>Country:</label><input type='text' name='country' value='' class='auto'></p>
</div>

<script>
$(function() {
     $(".auto").
autocomplete({ source: "search.php",minLength: 1})      

});
</script>
</body>
</html>
gjshiwoxia 回答:jQuery自动完成结果定位

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3158481.html

大家都在问