c92438eb0ead95f72f43ebc4468f35c6cab10a4e.svn-base 1.1 KB

1234567891011121314151617181920212223242526272829
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>模仿手机地区插件</title>
  5. <meta charset="utf-8" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  7. <link rel="stylesheet" type="text/css" href="/iamberry/common/other/addr/css/mobile-select-area.css">
  8. <script type="text/javascript" src="/iamberry/common/other/addr/js/require.js"></script>
  9. </head>
  10. <body>
  11. <input type="text" id="txt_area" value="广东省 深圳市 罗湖区" data-value="20,234,501"/>
  12. <input type="hidden" id="hd_area" value="20,234,501"/>
  13. <script>
  14. requirejs.config({
  15. //By default load any module IDs from js/lib
  16. baseUrl: '/iamberry/common/other/addr/js',
  17. paths: {
  18. $: '/iamberry/common/other/addr/js/jquery-1.11.2',
  19. dialog:'dialog',
  20. 'mobile-select-area':'mobile-select-area'
  21. }
  22. });
  23. require(['mobile-select-area','$'], function(MobileSelectArea,$) {
  24. var selectArea = new MobileSelectArea();
  25. selectArea.init({trigger:'#txt_area',value:$('#hd_area').val(),data:'/iamberry/common/other/addr/js/data.json'});
  26. });
  27. </script>
  28. </body>
  29. </html>