Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/336.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 用于搜索的JQuery AJAX查找_C#_Jquery_Ajax_Database - Fatal编程技术网

C# 用于搜索的JQuery AJAX查找

C# 用于搜索的JQuery AJAX查找,c#,jquery,ajax,database,C#,Jquery,Ajax,Database,我在网页上有一个文本框,我想编写一些JQuery、AJAX代码,这样当用户在这个字段中键入一些文本时,它会从数据库中的列中查找值,并返回以他们键入的字母开头的值。当用户在文本框中键入更多字符时,从数据库中选择的字符会变小。然后,用户可以使用其中一个选项自动完成输入。我如何做到这一点,这里会有性能方面的考虑吗 <script type="text/javascript"> $('#search').autocomplete({ url: 'suggestions.php', wid

我在网页上有一个文本框,我想编写一些JQuery、AJAX代码,这样当用户在这个字段中键入一些文本时,它会从数据库中的列中查找值,并返回以他们键入的字母开头的值。当用户在文本框中键入更多字符时,从数据库中选择的字符会变小。然后,用户可以使用其中一个选项自动完成输入。我如何做到这一点,这里会有性能方面的考虑吗

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
谢谢

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
萨钦

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
好了

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

好了

[jQuery UI的自动完成。][1]

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
这里有一个例子:

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

$(“#搜索”)。自动完成({
url:'suggestions.php',宽度:300,
最高:10,
延误:100,
缓存长度:1,
卷轴:错,
推荐理由:错
});
下面是C#的具体例子

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
如果您不想使用jquery。您可以使用ASP.NET AJAX工具包

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

[jQuery UI的自动完成。][1]

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
这里有一个例子:

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

$(“#搜索”)。自动完成({
url:'suggestions.php',宽度:300,
最高:10,
延误:100,
缓存长度:1,
卷轴:错,
推荐理由:错
});
下面是C#的具体例子

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>
如果您不想使用jquery。您可以使用ASP.NET AJAX工具包

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

还有一个非常好的工具,它提供了查找功能,还提供了对其他数据元素的访问

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

还有一个非常好的工具,它提供了查找功能,还提供了对其他数据元素的访问

<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>

jQuery自动完成!看看jQuery自动完成!看看这个可以与C#一起使用吗?它是否使用数据库中的值?它可以与C#一起使用吗?它是否使用数据库中的值?你可以用这个查询数据库吗?是的,它有远程或本地查找选项。远程调用将是对服务器的ajax调用,以检索结果。您甚至可以缓存远程调用,这是我现在真正了解的。请参见该站点右侧的示例。它们向您展示了如何实现不同的选项。您能用它查询数据库吗?是的,它有远程或本地查找选项。远程调用将是对服务器的ajax调用,以检索结果。您甚至可以缓存远程调用,这是我现在真正了解的。请参见该站点右侧的示例。它们向您展示了如何实现不同的选项。请先看这个:请先看这个:和
<script type="text/javascript">
$('#search').autocomplete({
  url: 'suggestions.php', width: 300,
  max: 10,
  delay: 100,
  cacheLength: 1,
  scroll: false,
  highlight: false
});
</script>