• JQuery 输入城市 提示(445个)


    <style><!--
                #suggest{opacity: 0.9;}
                .gray{color:gray;}
                .ac_results {background:#fff;border:1px solid #7f9db9;position:absolute;z-index:10000;display:none;}
                .ac_results ul{margin:0;padding:0;list-style:none;}
                .ac_results li a{white-space:nowrap;text-decoration:none;display:block;color:#05a;padding:1px 3px;}
                .ac_results li{border:1px solid #fff;}
                .ac_over,.ac_results li a:hover {background:#c8e3fc;}
                .ac_results li a span{float:right;} 
                .ac_result_tip{border-bottom:1px dashed #666;padding:3px;}
            
    --></style>
    <p><input id="arrcity" type="text" name="city" /></p>
    <div id="suggest" class="ac_results">&nbsp;</div>
    <script type="text/javascript" src="http://www.cnblogs.com/Js/city/jquery-1.4.2.min.js"></script>
    <script type="text/javascript" src="http://www.cnblogs.com/Js/city/j.suggest.js"></script>
    <script type="text/javascript" src="http://www.cnblogs.com/Js/city/j.dimensions.js"></script>
    <script type="text/javascript" src="http://www.cnblogs.com/Js/city/aircity.js"></script>
    <script type="text/javascript">// <![CDATA[
    $(function(){
        $("#suggest").width($(".form-group").width());
        $("#arrcity").suggest(citys,{hot_list:commoncitys,dataContainer:'#arrcity_3word',onSelect:function(){$("#city2").click();},attachObject:'#suggest'});
    });
    // ]]></script>

    js 文件 http://files.cnblogs.com/files/yutaoyao/city.rar

    效果

  • 相关阅读:
    js基础:关于Boolean() 与 if
    @@cursor_rows变量解析
    SQL Prompt
    google android sdk下载hoosts
    java环境配置
    Linux grep用法整理
    bash调试执行
    Vim常见快捷键汇总
    Linux查看磁盘块大小
    Linux Bash终端快捷键小结
  • 原文地址:https://www.cnblogs.com/yutaoyao/p/4522390.html
Copyright © 2020-2023  润新知