Java&Script
Upcoming SlideShare
Loading in...5
×
 

Java&Script

on

  • 1,072 views

培训教程

培训教程

Statistics

Views

Total Views
1,072
Views on SlideShare
1,071
Embed Views
1

Actions

Likes
3
Downloads
16
Comments
0

1 Embed 1

http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Java&Script Java&Script Presentation Transcript

  • 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/2/ Tbra: http://assets.taobaocdn.com/tbra/1.0/examples/
  • [ ] 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’, function() { //doSomething });
  • <button onclick=”doSomething();” /> <button id=”J_Button” /> YAHOO.util.Event.on(‘J_Button’, ‘click’, function() { //doSomething });
  • OK, (function { var Event = YAHOO.util.Event; Event.on(‘J_Button’, ‘click’, function() { //doSomething }); })();
  • [ ] YUI UED
  • 4.
  • JSON
  • JSON