Autocomplete不适用于php页面,但适用于html页面
Autocomplete不在php页面上工作,但在html页面上工作得非常好 在head标签中,我有源代码和脚本Autocomplete不适用于php页面,但适用于html页面,php,autocomplete,Php,Autocomplete,Autocomplete不在php页面上工作,但在html页面上工作得非常好 在head标签中,我有源代码和脚本 <link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel = "stylesheet"> <script src = "https://code.jquery.com/jqu
<link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css"
rel = "stylesheet">
<script src = "https://code.jquery.com/jquery-1.10.2.js"></script>
<script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script>
$(function() {
var availableTutorials = [
"ActionScript",
"Bootstrap",
"C",
"C++",
];
$( "#automplete-1" ).autocomplete({
source: availableTutorials
});
});
</script>
$(函数(){
var AvailableAutorials=[
“动作脚本”,
“引导”,
“C”,
“C++”,
];
$(“#自动完成-1”)。自动完成({
资料来源:AvailableAutorials
});
});
然后我把输入放在了网页的主体部分
<div class = "ui-widget">
<div class="row form-group">
<div class="col-12 col-md-12">
<input id="automplete-1" class="form-control">
</div>
</div>
</div>
在输入“A”或“B”(自动完成或引导)等中键入,它不会显示任何结果
如上所述,在html页面上可以正常工作,但在我的php页面上不行。您能显示您的php代码吗?一开始我怀疑页面中的某个地方有语法错误。谢谢你的评论-页面太大,无法显示所有php,但另一个.js文件干扰了它。