Dojo1.1版Dialog、BorderContainer、ContentPane等集成测试例子


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
 <head>
  <title>file.html</title>

  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <SCRIPT src="../dojo/dojo/dojo.js" djConfig="isDebug: false, parseOnLoad: true" type="text/javascript"></SCRIPT>
  <script type="text/javascript" src="../dojo/dijit/tests/_testCommon.js"></script>
  <style type="text/css">
   @import "../dojo/resources/dojo.css";
   @import "../dojo/dijit/tests/css/dijitTests.css";
   body { font-family : sans-serif; }
   form { margin-bottom : 0; }
   table { border: none; }
  </style>

  <script type="text/javascript">
   dojo.require("dijit.form.Button");
   dojo.require("dijit.form.TextBox");
   dojo.require("dijit.Dialog");
   
   dojo.require("dijit.layout.TabContainer");
   dojo.require("dijit.layout.ContentPane");
   dojo.require("dojo.parser");
   
   dojo.require("dijit.layout.BorderContainer");
  </script>

  <SCRIPT type="text/javascript">
  function showDialog(){
   //alert("sdl");
   dijit.byId("borderContainer").show();
  }
  </SCRIPT>
  <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
 </head>

 <body class="soria">
  <DIV>
   <DIV style="float:left;padding:10px">
    <button type="button" dojoType="dijit.form.Button" onclick="showDialog()" style="padding:1 0 1 0">
     Show BorderContainer Dialog
    </button>
   </DIV>
   <DIV style="clear:left"></DIV>

  </DIV>


  <!-- Dialog:Split Dialog  [style="visibility:hidden" 很重要]-->
  <DIV dojoType="dijit.Dialog" id="borderContainer" title="TabContainer Dialog" style="visibility:hidden">

   <div class="bc" dojoType="dijit.layout.BorderContainer" style="width:400px; height:400px;">

    <div dojoType="dijit.layout.ContentPane" region="top" splitter="true">
     <input type="text" name="test" id="test" dojoType="dijit.form.TextBox" style="font-size:14px">
     <button type="button" dojoType="dijit.form.Button" onclick="dijit.byId('message').show()" style="padding:1 0 1 0">
      提交
     </button>
     <br />&nbsp;
     
     <DIV dojoType="dijit.Dialog" id="message" title="Message">
      Message!
     </div>
    </div>

    <div dojoType="dijit.layout.ContentPane" region="center">
     <div dojoType="dijit.layout.TabContainer" style="width: 400px; height: 400px;">
      <div dojoType="dijit.layout.ContentPane" title="First tab">

       <DIV style="float:left;padding:10px;clear:left">
        <form name="f1" id="f1" action="" method="post">
         <table border="0">
          <tr>
           <td>
            Login:
           </td>
           <td>
            <input type="text" name="login" id="login" dojoType="dijit.form.TextBox" style="font-size:14px">
           </td>
          </tr>
          <tr>
           <td>
            Password:
           </td>
           <td>
            <input type="file" name="file" id="file" dojoType="dijit.form.TextBox" style="font-size:14px">
           </td>
          </tr>
          <tr>
           <td colspan="2" align="center">
            <button type="button" dojoType="dijit.form.Button" onclick="alert('sdl')" style="padding:1 0 1 0">
             提交
            </button>
           </td>
          </tr>
         </table>
        </form>
       </DIV>

      </div>
      <div dojoType="dijit.layout.ContentPane" title="Second tab" href="message.html">
      </div>
     </div>
    </DIV>
   </div>
  </div>

 </body>
</html>
 

你可能感兴趣的:(Dojo1.1版Dialog、BorderContainer、ContentPane等集成测试例子)