Your SlideShare is downloading. ×
0
Java + Script
      训   JavaScript




    UED
JavaScript   Java
                    …
                    Java
…
…
,
Java         JavaScript


                          ,
Java   JavaScript
Java + Script
           =
Groovy || JRuby || Scala
Java + Script
    |!=|
 JavaScript
JavaScript is
JavaScript is




JavaScript
1.
JavaScript


      App

      Tbra

      YUI

Native JavaScript
Native JavaScript


简单
YUI
Tbra
Resource
JavaScript:
https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference


YUI:
http://developer.yahoo.com/yui/...
[             ]

          JavaScript

    YUI

     Tbra


Reference    Example
2.
source
(abc.source.js)
source
(abc.source.js)


  source
 abc.js
source
(abc.source.js)   {
abc.source.js?t=20121212.js
abc.source.css?t=20121212.css
Demo




       Assets
<script src=”abc.js” />



<script src=”abc.js”></script>
[        ]

         source
source



                      assets

   script
3.
{
    (function() {
          //code here
    })();


                        }
var fn = function() {
     //code here
};
fn();
var fn = function() {
     //code here
};
fn();
var fn = function() {
     //code here
};
fn();
(function() {
     //code here
}) ();
(function() {
      var Dom = YAHOO.util.Dom,
      Event = YAHOO.util.Event;

        //my code
})();
<button onclick=”doSomething();” />



     <button id=”J_Button” />
     YAHOO.util.Event.on(‘J_Button’, ‘click’, functio...
<button onclick=”doSomething();” />



     <button id=”J_Button” />
     YAHOO.util.Event.on(‘J_Button’, ‘click’, functio...
OK,
(function {
   var Event = YAHOO.util.Event;
   Event.on(‘J_Button’, ‘click’, function() {
       //doSomething
   });...
[         ]



              YUI




    UED
4.
JSON
JSON
Java&Script
Java&Script
Java&Script
Java&Script
Java&Script
Java&Script
Java&Script
Upcoming SlideShare
Loading in...5
×

Java&Script

863

Published on

培训教程

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

No Downloads
Views
Total Views
863
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
17
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • Transcript of "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
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×