0

CSWING で jsFiddle の [code][1] を参照すると、「TypeError: this.domNode is null (26 out of range 15) in dojo.js」と表示されるのはなぜですか。

学習とテストのために、CSWING からコピーした私のコードを次に示します。

<!DOCTYPE html>
<html>
 <head>
  <style>
    html, body /*standard layout for every dojo webpage*/
  {
    width: 100%;
    height: 100%;
    padding: 0px;
    margin: 5px;
    overflow: hidden;/*no scrollbar used*/
  }

#standby {
    position: absolute;
    top: 50%;
    left: 50%;
    width:32px;
    height:32px;
    margin-top: -16px;
    margin-left: -16px;
   /*
    width: 300px;
    height: 300px;
    background-color: #e7e7e7;
   */
}

</style>
<link rel="stylesheet" href="../dojo1_8/dijit/themes/claro/claro.css">
<script>dojoConfig = {parseOnLoad: true}</script>
<script src="../dojo1_8/dojo/dojo.js"></script>

</head>
<body class="claro">
<div id="standby">    
<div id="btn" data-dojo-type="dijit.form.Button" data-dojo-props="label:     
Go'"></div>    
</div>

<script>
require(["dojox/widget/Standby","dijit/form/Button",
"dojo/store/Memory",'dijit/form/ComboBox',
"dojo/on", "dojo/domReady!"],
function(Standby, Button, Memory, on, ComboBox)
{       
    var standby = new Standby
    ({
           id: "standbyObj",
       target: "btn",
        color: "transparent",
       zindex: "auto",
     duration: "1000"
    });
dojo.body().appendChild(standby.domNode);
standby.startup();

on(dojo.byId('btn'), 'click', function() 
{
    standby.show();

  //simulate a request.  hide the timeout in 5 seconds
 setTimeout(function()
{
    standby.hide(); 
    }, 5000);
   });
   });
   </script>
   </body>
</html>

お知らせ下さい。クレメントに感謝 [1]: http://jsfiddle.net/cswing/253Te/

4

1 に答える 1