经理给了本书《精通dojo》,2008年,估计版本也1.3以前的。
现在用规则完全不一样,思想就有用,写个例子半天不出来,原来就因为版本问题,这样不行吖,学习起来太吃力了,那群人搞什么吖!改这个有用??服了!
<!DOCTYPE html> <html> <head> <Meta charset="utf-8"> <title>Tutorial: Hello Dojo!</title> <style> @import "dojo/resources/dojo.css"; @import "dijit/themes\tundra/tundra.css"; </style> <script type="text/javascript" src="dojo/dojo.js" dojo-Config="parSEOnLoad:true;debug:true"></script> <script> dojo.require("dojo.parser"); dojo.require("dijit.layout.TabContainer"); dojo.require("dijit.layout.ContentPane"); </script> </head> <body class="tundra"> <div dojoType="dijit.layout.TabContainer" style="height:500px; width:400px;> <div dojoType="dijit.layout.ContentPane" title="test"> 24324 </div> </div> </body> </html>
这个完全没用,但是是书上的!
<!DOCTYPE html> <html> <head> <Meta charset="utf-8"> <title>Tutorial: Hello Dojo!</title> <style> @import "dojo/resources/dojo.css"; @import "dijit/themes/tundra/tundra.css"; </style> <script type="text/javascript" src="dojo/dojo.js" data-dojo-config="isDebug: true,async: true,parSEOnLoad: true"></script> </head> <body class="tundra"> <button id="btn" data-dojo-type="dijit/form/Button" data-dojo-props=" onClick:function(){ console.log('First button was clicked!'); }"> Click Me! </button> <div data-dojo-type="dijit/layout/TabContainer" style="height:500px; width:400px;> <div data-dojo-type="dijit/layout/ContentPane" title="test"> 24324 </div> <div data-dojo-type="dijit/layout/ContentPane" title="test"> 24324 </div> <div data-dojo-type="dijit/layout/ContentPane" title="test"> 24324 </div> </div> <script> // load requirements for declarative widgets in page content require(["dijit/form/Button","dijit/layout/TabContainer","dijit/layout/ContentPane","dojo/parser","dojo/domReady!"]); </script> </body> </html>这个换过来声明,但是container没有用,如果要升级,还不是重新来?成本也太高了吧! 原文链接:https://www.f2er.com/dojo/291441.html