我使用以下 form.profile.js 文件创建了自定义构建
dependencies ={
layers: [
{
name: "form.js",
dependencies: [
"dijit.form.Button",
"dijit.form.Form",
"dijit.form.ValidationTextBox"
]
}
],
prefixes: [
[ "dijit", "../dijit" ]
]
};
我得到了 form.js 和 form.js.uncompressed.js 文件
当我尝试在我的 jsp 中使用 form.js 时,它给了我这样的错误
无法加载类'dijit.form.ValidationTextBox
下面是jsp
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<link href="./scripts/dijit/themes/tundra/tundra.css" type="text/css" rel="stylesheet"/>
<style>
.myClass{
font-size:14px;
}
</style>
<script src="./scripts/dojo/dojo.js" djConfig="parseOnLoad:true"></script>
<script src="./scripts/dojo/form.js"></script>
<script>
//dojo.require("dijit.form.Button");
//dojo.require("dijit.form.ValidationTextBox");
dojo.ready(function(){
});
function showDialog(){
alert("Clicked!!");
//dijit.byId("dialog1").show();
}
function changed(){
alert(dijit.byId("select1").value);
dijit.byId("name").attr("value",dijit.byId("select1").value);
}
</script>
</head>
<body class="tundra">
<input type="text" dojoType="dijit.form.ValidationTextBox" id="name" propercase=true trim=true required=true invalidMessage="Please Enter a valid value" />
<button dojoType="dijit.form.Button" value="Click" id="b1" onclick="showDialog()">Click</button>
</body>
</html>
请让我知道我哪里出错了。