使用Dojo创建标签页

前端之家收集整理的这篇文章主要介绍了使用Dojo创建标签页前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、在上次搭建的环境下,新建一个“tabs_form.jsp”页面

2、在页面中编写如下代码

      1. <%@pagelanguage="java"import="java.util.*"pageEncoding="UTF-8"%>
      1. <%
      1. Stringpath=request.getContextPath();
      1. StringbasePath=request.getScheme()+"://"
      1. +request.getServerName()+":"+request.getServerPort()
      1. +path+"/";
      1. %>
      1. <!DOCTYPEHTMLPUBLIC"-//W3C//DTDHTML4.01Transitional//EN">
      1. <html>
      1. <head>
      1. <basehref="<%=basePath%>">
      1. <title>Dojo--tabs_form</title>
      1. <Metahttp-equiv="pragma"content="no-cache">
      1. <Metahttp-equiv="cache-control"content="no-cache">
      1. <Metahttp-equiv="expires"content="0">
      1. <Metahttp-equiv="keywords"content="keyword1,keyword2,keyword3">
      1. <Metahttp-equiv="description"content="Thisismypage">
      1. <linkrel="stylesheet"type="text/css"
      1. href="scripts/dojo-release-1.8.1/dijit/themes/tundra/tundra.css">
      1. <linkrel="stylesheet"type="text/css"
      1. href="scripts/dojo-release-1.8.1/dojo/resources/dojo.css">
      1. <!--引入dojo.js-->
      1. <scripttype="text/javascript"
      1. src="scripts/dojo-release-1.8.1/dojo/dojo.js"
      1. djConfig="parSEOnLoad:true,isDebug:true"></script>
      1. <scripttype="text/javascript">
      1. dojo.require("dojo.parser");
      1. dojo.require("dijit.layout.ContentPane");
      1. dojo.require("dijit.layout.TabContainer");
      1. </script>
      1. </head>
      1. <bodyclass="tundra">
      1. <divdojoType="dijit.layout.TabContainer"style="width:600px;height:300px;">
      1. <divdojoType="dijit.layout.ContentPane"title="个人信息">
      1. <labelfor="name">
      1. 姓  名:
      1. </label>
      1. <inputtype="text"name="name"id="name"size="30"/>
      1. <br>
      1. <labelfor="age">
      1. 年  龄:
      1. </label>
      1. <inputtype="text"name="age"id="age"size="30"/>
      1. <br>
      1. <labelfor="sex">
      1. 性  别:
      1. </label>
      1. <inputtype="text"name="sex"id="sex"size="30"/>
      1. <br>
      1. <labelfor="email">
      1. 电子邮件:
      1. </label>
      1. <inputtype="text"name="email"id="email"size="30"/>
      1. <br>
      1. </div>
      1. <divdojoType="dijit.layout.ContentPane"title="地址信息">
      1. <labelfor="country">
      1. 国  家:
      1. </label>
      1. <inputtype="text"name="country"id="country"size="30"/>
      1. <br>
      1. <labelfor="province">
      1. 所属省份:
      1. </label>
      1. <inputtype="text"name="province"id="province"size="30"/>
      1. <br>
      1. <labelfor="city">
      1. 所属城市:
      1. </label>
      1. <inputtype="text"name="city"id="city"size="30"/>
      1. <br>
      1. </div>
      1. </div>
      1. </body>
      1. </html>

    3、启动tomcat服务器,打开“http://localhost:8080/dojo_test/tabs_form.jsp”即可访问到如下所示的页面

    猜你在找的Dojo相关文章