/gallery/city-selector/1.0/demo.html
HTML | 95 lines | 94 code | 1 blank | 0 comment | 0 complexity | 22da58696ce39f1ae43b98e9845d810b MD5 | raw file
- <!doctype html>
- <html>
- <head>
- <meta charset="utf-8"/>
- <title>KISSY gallery - yourGallery</title>
- <link rel="stylesheet" href="http://a.tbcdn.cn/s/kissy/1.3.0/css/dpl/base-min.css"/>
- <link rel="stylesheet" href="../../../tools/skin/default.css"/>
- <script src="http://a.tbcdn.cn/s/kissy/1.3.0/kissy.js" charset="utf-8"></script>
- <link rel="stylesheet" href="../../../tools/skin/show-code.js"/>
- <script>
- KISSY.config({
- packages:[
- {
- name:"gallery",
- tag:"20111220",
- path:"../../../", // cdn上适当修改对应路径
- charset:"utf-8"
- }
- ]
- });
- </script>
- </head>
- <body>
- <div id="header">
- <h1 class="logo"><a alt="KISSY" href="http://kissyui.com/"><img src="http://a.tbcdn.cn/s/kissy/logo.png"/></a></h1>
- <div class="sub-title">Gallery</div>
- <ul class="navigation">
- <li><a href="http://docs.kissyui.com/">首页</a></li>
- <li><a href="http://github.com/kissyteam">源码</a></li>
- </ul>
- </div>
- <div id="content">
- <div class="s-crumbs">
- <span>当前位置:</span>
- <a href="http://kissyui.com/">KISSY</a>
- <a href="http://docs.kissyui.com/kissy-gallery/index.html">Gallery</a>
- <span>CitySelector</span>
- </div>
- <pre class="s-section">
- 作者:baxian@taobao.com(霸先)
- 功能:城市选择组件
- 源码:<a href="index.js">index.js</a>
- <a href="../out/classes/CitySelector.html">API文档</a>
- </pre>
- <h3 class="s-title">demo1:使用overlay模式</h3>
- <div class="s-section s-demo">
- <input type="text" id="foo" style="width:200px">
- <script>
- KISSY.use('gallery/city-selector/1.0/domestic,gallery/city-selector/1.0/index',function(S,DomesticData,CitySelector){
- var tmp = new CitySelector({
- data : DomesticData,
- canProvinceSelect : true,
- node : '#foo'
- });
- });
- </script>
- </div>
- <h3 class="s-title">demo2:使用指定容器模式</h3>
- <div class="s-section s-demo">
- <input type="text" id="foo1" style="width:200px">
- <div id="con1"></div>
- <script>
- KISSY.use('gallery/city-selector/1.0/domestic,gallery/city-selector/1.0/index',function(S,DomesticData,CitySelector){
- var tmp = new CitySelector({
- data : DomesticData,
- canProvinceSelect : true,
- render : '#con1',
- node : '#foo1'
- });
- });
- </script>
- </div>
- <h3 class="s-title">demo2:多选</h3>
- <div class="s-section s-demo">
- <input type="text" id="foo2" style="width:500px">
- <div id="con2"></div>
- <script>
- KISSY.use('gallery/city-selector/1.0/foreign,gallery/city-selector/1.0/index',function(S,DomesticData,CitySelector){
- var tmp = new CitySelector({
- data : DomesticData,
- canProvinceSelect : true,
- mutiple : true,
- render : '#con2',
- node : '#foo2'
- });
- });
- </script>
- </div>
- </div>
- <div id="footer">
- © Copyright 2010~2100, KISSY Team.
- </div>
- </body>
- </html>