Java&Script

1,053 views

Published on

培训教程

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,053
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
19
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Java&Script

    1. 1. Java + Script 训 JavaScript UED
    2. 2. JavaScript Java … Java
    3. 3.
    4. 4.
    5. 5. , Java JavaScript , Java JavaScript
    6. 6. Java + Script = Groovy || JRuby || Scala
    7. 7. Java + Script |!=| JavaScript
    8. 8. JavaScript is
    9. 9. JavaScript is JavaScript
    10. 10. 1.
    11. 11. JavaScript App Tbra YUI Native JavaScript
    12. 12. Native JavaScript 简单
    13. 13. YUI
    14. 14. Tbra
    15. 15. Resource JavaScript: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference YUI: http://developer.yahoo.com/yui/2/ Tbra: http://assets.taobaocdn.com/tbra/1.0/examples/
    16. 16. [ ] JavaScript YUI Tbra Reference Example
    17. 17. 2.
    18. 18. source (abc.source.js)
    19. 19. source (abc.source.js) source abc.js
    20. 20. source (abc.source.js) {
    21. 21. abc.source.js?t=20121212.js abc.source.css?t=20121212.css
    22. 22. Demo Assets
    23. 23. <script src=”abc.js” /> <script src=”abc.js”></script>
    24. 24. [ ] source source assets script
    25. 25. 3.
    26. 26. { (function() { //code here })(); }
    27. 27. var fn = function() { //code here }; fn();
    28. 28. var fn = function() { //code here }; fn();
    29. 29. var fn = function() { //code here }; fn();
    30. 30. (function() { //code here }) ();
    31. 31. (function() { var Dom = YAHOO.util.Dom, Event = YAHOO.util.Event; //my code })();
    32. 32. <button onclick=”doSomething();” /> <button id=”J_Button” /> YAHOO.util.Event.on(‘J_Button’, ‘click’, function() { //doSomething });
    33. 33. <button onclick=”doSomething();” /> <button id=”J_Button” /> YAHOO.util.Event.on(‘J_Button’, ‘click’, function() { //doSomething });
    34. 34. OK, (function { var Event = YAHOO.util.Event; Event.on(‘J_Button’, ‘click’, function() { //doSomething }); })();
    35. 35. [ ] YUI UED
    36. 36. 4.
    37. 37. JSON
    38. 38. JSON

    ×