demo.html 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  6. <title>SG Demo</title>
  7. <script src="http://sg.5dev.cn/assets/sg.js"></script>
  8. </head>
  9. <body>
  10. <div class="layui-container">
  11. <blockquote class="layui-elem-quote">Notice:<?php echo $msg ?></blockquote>
  12. <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
  13. <legend>Demo</legend>
  14. </fieldset>
  15. <div class="layui-row">
  16. <form class="layui-form" action="">
  17. <div class="layui-form-item">
  18. <label class="layui-form-label">Product</label>
  19. <div class="layui-input-block">
  20. <input type="text" name="product_name" id="product_name" value="test" required="" lay-verify="required" placeholder="Please enter Product" autocomplete="off" class="layui-input">
  21. </div>
  22. </div>
  23. <div class="layui-form-item">
  24. <label class="layui-form-label">Amount</label>
  25. <div class="layui-input-inline">
  26. <input type="text" name="amount" id="amount" value="1" required="" lay-verify="required" placeholder="Please enter Product" autocomplete="off" class="layui-input">
  27. </div>
  28. </div>
  29. <div id="pay"></div>
  30. </form>
  31. </div>
  32. </div>
  33. <script>
  34. layui.use(['layer', 'form'], function(){
  35. var $ = layui.$;
  36. SG.layui = layui;
  37. SG.id = '#pay';
  38. SG.product_name = '#product_name';
  39. SG.amount = '#amount';
  40. SG.Html();
  41. });
  42. </script>
  43. </body>
  44. </html>