PageRenderTime 48ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/gallery/city-selector/1.0/demo.html

https://github.com/akecn/kissy-gallery
HTML | 95 lines | 94 code | 1 blank | 0 comment | 0 complexity | 22da58696ce39f1ae43b98e9845d810b MD5 | raw file
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8"/>
  5. <title>KISSY gallery - yourGallery</title>
  6. <link rel="stylesheet" href="http://a.tbcdn.cn/s/kissy/1.3.0/css/dpl/base-min.css"/>
  7. <link rel="stylesheet" href="../../../tools/skin/default.css"/>
  8. <script src="http://a.tbcdn.cn/s/kissy/1.3.0/kissy.js" charset="utf-8"></script>
  9. <link rel="stylesheet" href="../../../tools/skin/show-code.js"/>
  10. <script>
  11. KISSY.config({
  12. packages:[
  13. {
  14. name:"gallery",
  15. tag:"20111220",
  16. path:"../../../", // cdn上适当修改对应路径
  17. charset:"utf-8"
  18. }
  19. ]
  20. });
  21. </script>
  22. </head>
  23. <body>
  24. <div id="header">
  25. <h1 class="logo"><a alt="KISSY" href="http://kissyui.com/"><img src="http://a.tbcdn.cn/s/kissy/logo.png"/></a></h1>
  26. <div class="sub-title">Gallery</div>
  27. <ul class="navigation">
  28. <li><a href="http://docs.kissyui.com/">首页</a></li>
  29. <li><a href="http://github.com/kissyteam">源码</a></li>
  30. </ul>
  31. </div>
  32. <div id="content">
  33. <div class="s-crumbs">
  34. <span>当前位置</span>
  35. <a href="http://kissyui.com/">KISSY</a>
  36. <a href="http://docs.kissyui.com/kissy-gallery/index.html">Gallery</a>
  37. <span>CitySelector</span>
  38. </div>
  39. <pre class="s-section">
  40. 作者baxian@taobao.com(霸先)
  41. 功能城市选择组件
  42. 源码<a href="index.js">index.js</a>
  43. <a href="../out/classes/CitySelector.html">API文档</a>
  44. </pre>
  45. <h3 class="s-title">demo1:使用overlay模式</h3>
  46. <div class="s-section s-demo">
  47. <input type="text" id="foo" style="width:200px">
  48. <script>
  49. KISSY.use('gallery/city-selector/1.0/domestic,gallery/city-selector/1.0/index',function(S,DomesticData,CitySelector){
  50. var tmp = new CitySelector({
  51. data : DomesticData,
  52. canProvinceSelect : true,
  53. node : '#foo'
  54. });
  55. });
  56. </script>
  57. </div>
  58. <h3 class="s-title">demo2:使用指定容器模式</h3>
  59. <div class="s-section s-demo">
  60. <input type="text" id="foo1" style="width:200px">
  61. <div id="con1"></div>
  62. <script>
  63. KISSY.use('gallery/city-selector/1.0/domestic,gallery/city-selector/1.0/index',function(S,DomesticData,CitySelector){
  64. var tmp = new CitySelector({
  65. data : DomesticData,
  66. canProvinceSelect : true,
  67. render : '#con1',
  68. node : '#foo1'
  69. });
  70. });
  71. </script>
  72. </div>
  73. <h3 class="s-title">demo2:多选</h3>
  74. <div class="s-section s-demo">
  75. <input type="text" id="foo2" style="width:500px">
  76. <div id="con2"></div>
  77. <script>
  78. KISSY.use('gallery/city-selector/1.0/foreign,gallery/city-selector/1.0/index',function(S,DomesticData,CitySelector){
  79. var tmp = new CitySelector({
  80. data : DomesticData,
  81. canProvinceSelect : true,
  82. mutiple : true,
  83. render : '#con2',
  84. node : '#foo2'
  85. });
  86. });
  87. </script>
  88. </div>
  89. </div>
  90. <div id="footer">
  91. &copy; Copyright 2010~2100, KISSY Team.
  92. </div>
  93. </body>
  94. </html>