解决方案 »

  1.   

    http://blog.csdn.net/yulei_qq/article/details/17785385
      

  2.   

    Sevlet类        这个是什么?
    进行连接数据库,模糊查询的JAVA类       这个Java?    
      

  3.   

    Sevlet类        这个是什么?
    进行连接数据库,模糊查询的JAVA类       这个Java?    这个,不好意思http://blog.csdn.net/i99121570/article/details/24795871
      

  4.   

    就是用jqueryui的一个方法,具体可以查看demo
      

  5.   

    Sevlet类        这个是什么?
    进行连接数据库,模糊查询的JAVA类       这个Java?    这个,不好意思http://blog.csdn.net/i99121570/article/details/24795871怎么直接显示一排
    如图:
    textbox  和div  是这样把
    如图:
      

  6.   

    你只不过想完成谷歌下拉自助填词的功能,而实际上,谷歌的下拉并不像你看到的这么简单,它有记录,分词,结果记录数等功能,当然太过于复杂,我们没办法讨论,只单单下拉自助填词功能,ASP.NET据我所知有两种方法可以实现,一种是用AJAX.NET,一种是用JQ,都是第三方。
    http://www.it165.net/pro/html/201211/4092.html
    http://bbs.51cto.com/thread-555663-1.html
    这是两种方法,推荐用Toolkit,这个使用非常简单,也满足基本需求。
      

  7.   

    我看demo 数据都是直接输上去的 不是从数据库取的,如图:
      

  8.   

    我看demo 数据都是直接输上去的 不是从数据库取的,如图:
    没错,里面的一段json数据就是从数据库里读出来的, 是从回调函数里调用,学习下jquery ajax
      

  9.   

    我看demo 数据都是直接输上去的 不是从数据库取的,如图:
    没错,里面的一段json数据就是从数据库里读出来的, 是从回调函数里调用,学习下jquery ajax
    零基础 有没有什么网站 参考一下
      

  10.   

    jquery autocomplete插件  功能很强大
      

  11.   

    强大没用啊   不会取值
    Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> 1 <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>自定义提示</title>
        <script type="text/javascript" src="/js/jquery-1.4.2.min.js"></script>
        <script type="text/javascript" src="/js/jquery.autocomplete.min.js"></script>
        <link rel="Stylesheet" href="/js/jquery.autocomplete.css" />
        <script type="text/javascript">
            var emails = [
                { name: "Peter Pan", to: "[email protected]" },
                { name: "Molly", to: "[email protected]" },
                { name: "Forneria Marconi", to: "[email protected]" },
                { name: "Master <em>Sync</em>", to: "[email protected]" },
                { name: "Dr. <strong>Tech</strong> de Log", to: "[email protected]" },
                { name: "Don Corleone", to: "[email protected]" },
                { name: "Mc Chick", to: "[email protected]" },
                { name: "Donnie Darko", to: "[email protected]" },
                { name: "Quake The Net", to: "[email protected]" },
                { name: "Dr. Write", to: "[email protected]" },
                { name: "GG Bond", to: "[email protected]" },
                { name: "Zhuzhu Xia", to: "[email protected]" }
            ];            $(function() {
                    $('#keyword').autocomplete(emails, {
                        max: 12,    //列表里的条目数
                        minChars: 0,    //自动完成激活之前填入的最小字符
                        width: 400,     //提示的宽度,溢出隐藏
                        scrollHeight: 300,   //提示的高度,溢出显示滚动条
                        matchContains: true,    //包含匹配,就是data参数里的数据,是否只要包含文本框里的数据就显示
                        autoFill: false,    //自动填充
                        formatItem: function(row, i, max) {
                            return i + '/' + max + ':"' + row.name + '"[' + row.to + ']';
                        },
                        formatMatch: function(row, i, max) {
                            return row.name + row.to;
                        },
                        formatResult: function(row) {
                            return row.to;
                        }
                    }).result(function(event, row, formatted) {
                        alert(row.to);
                    });
                });
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <input id="keyword" />
            <input id="getValue" value="GetValue" type="button" />
        </div>
        </form>
    </body>
    </html>
      

  12.   

    sql 数据库怎么取值,这个是直接打上去的把 
      

  13.   

    sql 数据库怎么取值,这个是直接打上去的把 
    var emails = [
                <%=str %>
            ];
    这个是前台  后台动态从数据库中获取
    protected string str = "";int i = 0;
                DataTable dt=STCodeLogic.getdq("");
                foreach (DataRow dr in dt.Rows)
                {
                    if (i == dt.Rows.Count - 1)
                    {
                        str += " { name: \"" + dr["codemean"] + "\", to: \"" + dr["codeno"] + "\"}";
                    }
                    else
                    {
                        str += " { name: \"" + dr["codemean"] + "\", to: \"" + dr["codeno"] + "\"  },";
                    }
                    i++;
                }他就是这个格式 你在后台动态获取拼出来 然后在前台给他赋个值就行了
      

  14.   

    sql 数据库怎么取值,这个是直接打上去的把 
    它就是个json格式  给他拼出来就行了 应该有用ajax返回json方法 ,这个控件很灵活的
      

  15.   

    sql 数据库怎么取值,这个是直接打上去的把 
    它就是个json格式  给他拼出来就行了 应该有用ajax返回json方法 ,这个控件很灵活的
    后台取值跟普通的链接数据库语句没差别?
      

  16.   

    sql 数据库怎么取值,这个是直接打上去的把 
    它就是个json格式  给他拼出来就行了 应该有用ajax返回json方法 ,这个控件很灵活的
    后台取值跟普通的链接数据库语句没差别?
    没动啥意思
      

  17.   

    像这样?string constr = ConfigurationManager.AppSettings["che"].ToString(); 
        SqlConnection con = new SqlConnection(constr);  
        con.Open();
        string sqlstr = "SELECT FNumber from t_icitem ";
        SqlDataAdapter mydata = new SqlDataAdapter(sqlstr, con);
        mydata.SelectCommand.CommandTimeout = 0;
        DataSet ds = new DataSet();
        mydata.Fill(ds, sqlstr);
    然后前台这样var emails = [
                <%=sqlstr %>
            ];写
      

  18.   

     <asp:TextBox ID="TextBox1" runat="server" Height="41px" 
                ontextchanged="TextBox1_TextChanged" TextMode="MultiLine" Width="412px"  
                AutoPostBack="True"></asp:TextBox>  protected void TextBox1_TextChanged(object sender, EventArgs e)
            {
                string strConn = "data source=.;initial catalog=data;user id=sa;password=sa";
                SqlConnection conn = new SqlConnection(strConn);
                string strSQL = "select  title from table where title like '%" + TextBox1.Text + "%'";
                SqlDataAdapter rst = new SqlDataAdapter(strSQL, conn);
                conn.Open();
                DataSet ds = new DataSet();
                rst.Fill(ds);
                for (int i = 0; i < ds.Tables[0].Rows.Count - 1; i++)
                {
                    TextBox1.Text +="\n"+ds.Tables[0].Rows[i][0].ToString() + "\n";
                }
            }
      

  19.   

    text_changed   事件焦点离开才有效果把
      

  20.   

    根据下面的帖子做的,上面的有点乱。。数据多的能不能加个滚动条
    http://hi.baidu.com/partofmoon/item/bad959de0be22212e0f46fe1
      

  21.   

    结贴,jquey  ajax  连接数据库 还是不会