dojo中button的使用

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

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>
原文链接:https://www.f2er.com/dojo/291033.html

猜你在找的Dojo相关文章