您的位置:首页 > 其它

dojo中button的使用

2015-06-03 15:18 225 查看
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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: