expression.html 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title></title>
  5. <meta charset="utf-8">
  6. <script src="bind.js"></script>
  7. <script src="../../../dist/seed.js"></script>
  8. </head>
  9. <body>
  10. <div id="normal">
  11. <p sd-text="one + ' ' + two.three + '!'"></p>
  12. <input id="one" sd-model="one" name="one"> <input id="two" sd-model="two.three" name="two">
  13. </div>
  14. <div id="lazy">
  15. <p sd-text="one + ' ' + two.three + '!'"></p>
  16. <form id="form">
  17. <input sd-model="one" name="three"> <input sd-model="two.three" name="four">
  18. </form>
  19. </div>
  20. <script>
  21. var normal = new Seed({
  22. el: '#normal',
  23. scope: {
  24. one: 'Hello',
  25. two: {
  26. three: 'World'
  27. }
  28. }
  29. })
  30. var lazy = new Seed({
  31. el: '#lazy',
  32. lazy: true,
  33. scope: {
  34. one: 'Hi',
  35. two: {
  36. three: 'Ho'
  37. }
  38. }
  39. })
  40. </script>
  41. </body>
  42. </html>