当前位置 : 主页 > 网页制作 > Dojo >

dojo中button的使用

来源:互联网 收集:自由互联 发布时间:2021-06-15
dojo中的button可以这样用。 %@ page language="java" import="java.util.*" pageEncoding="utf-8"%%String path = request.getContextPath();String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+pat

dojo中的button可以这样用。

<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML>
<html>
  <head>
    <base href="<%=basePath%>">
    <title>My JSP 'treeTest.jsp' starting page</title>
	<link rel="stylesheet" type="text/css" href="js/dijit/themes/claro/claro.css">
	<script type="text/javascript" src="js/dojo/dojo.js" data-dojo-config="parseOnLoad:false"></script>
    <script type="text/javascript">
    	require([
    	         "dojo/parser",
    	         "dijit/registry",
    	         "dojo/on",
    	         "dijit/form/Button",
    	         "dijit/Tree",
    	         "dojo/domReady!"
    	         ], function(parser, registry, on, Button, Tree){
    			parser.parse().then(function(){
    				registry.byId("treeBtn").on("click", function(){
												
    				});
    			});
    	});
    </script>

  </head>
  
  <body class="claro">
    <button type="button" id="treeBtn" data-dojo-type="dijit/form/Button">tree测试</button>
  </body>
</html>
网友评论