样本页面

此示例是一个示例页面,显示如何使用 Dojo<h1> 标记内显示 Hello world 文本。

<!DOCTYPE html>
<html>

  <head>
    <meta charset="utf-8">
    <title>Dojo sample</title>
    <script src="//ajax.googleapis.com/ajax/libs/dojo/1.12.1/dojo/dojo.js" data-dojo-config="async: true"></script>
  </head>

  <body>
    <h1 id="Hello"></h1>
    

    <script>
      require([
        'dojo/dom'
      ], function(dom) {
      
        dom.byId('Hello').innerHTML = 'Hello world';
      });

    </script>
  </body>

</html>