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