JQuery自动完成与经典ASP
我很沮丧,因为这是无法解释的!此代码适用于:JQuery自动完成与经典ASP,jquery,autocomplete,Jquery,Autocomplete,我很沮丧,因为这是无法解释的!此代码适用于: <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>autocomplete demo</title> <link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.c
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>autocomplete demo</title>
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
</head>
<body>
<label for="autocomplete">Select a programming language: </label>
<input id="autocomplete">
<script>
$( "#autocomplete" ).autocomplete({
source: [ "c++", "java", "php", "coldfusion", "javascript", "asp", "ruby" ]
});
</script>
</body>
</html>
但是当我在另一个页面中放置必要的代码时,它就不起作用了!!我已经确保jquery只加载一次,并将一些代码从上到下移动,但没有任何效果!还有什么我可能错过的吗?这是我的代码行,它应该可以工作,也许这里有什么东西可以阻止它
<input id="dept" name="dept" type="text" class="rounded" placeholder="e.g. Production" autocomplete="off" required>
还有其他人遇到过这样的问题吗?您是否将脚本挂钩从“自动完成”更改为“部门”以匹配您的输入id更改?$自动完成。自动完成{…};你能解释一下另一个页面有什么不同吗?@briansol是的,我确保自动完成是标记中的id。@JamesLawruk另一个页面只是一个经典的ASP脚本,它使用POST执行多个操作,但是已经有一些jquery/javascript在运行,执行其他作业,但是据我所知,这些都不会干扰部门将HTML源代码从ASP页面复制到HTML页面的输入。然后开始删除HTML的部分,直到只剩下这里提供的代码。希望你能发现是什么打破了它。