bind.html 732 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <filter>
  5. <script src="http://js.selfimg.com.cn/dever/core/jquery.min.js"></script>
  6. <script src="http://js.selfimg.com.cn/dever/core/dever.js"></script>
  7. <script src="http://js.selfimg.com.cn/dever/core/template.dever.js"></script>
  8. </filter>
  9. <include system="" path="inc/" file="head"></include>
  10. </head>
  11. <body>
  12. <include system="" path="inc/" file="top"></include>
  13. <div id="name">test</div>
  14. <div id="list">
  15. <ul>
  16. <li><span>id</span>:<p>name</p></li>
  17. </ul>
  18. </div>
  19. </body>
  20. </html>
  21. <dever>
  22. //$("#name").fetch("demo/service/news.data[0]#name");
  23. $("#list li").loop("demo/service/news.data", {
  24. "p" : {
  25. "html" : "$v.name"
  26. }
  27. ,"span" : {
  28. "html" : "$v.id"
  29. }
  30. });
  31. </dever>