使用Dojo1.5测试一下DateTextBox,代码如下:
[code="java"]
[/code]
IE8中出现的结果如下图。(两个输入框,其中一个带X,点击下面一个,到处都是本应该在日期选择框中出现的字符)
Dojo一定要在服务器下才能运行吗?没有这个要求啊
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head>
<style type="text/css">
body, html { font-family:helvetica,arial,sans-serif; font-size:90%; }
</style>
<script src="../dojo/dojo.js"
djConfig="parseOnLoad: true">
</script>
<script type="text/javascript">
dojo.require("dijit.form.DateTextBox");
</script>
<link rel="stylesheet" type="text/css" href="../dijit/themes/claro/claro.css"
/>
</head>
<body class=" claro ">
<input type="text" name="date1" id="date1" value="2005-12-30" dojoType="dijit.form.DateTextBox"
required="true" />
<label for="date1">
Drop down Date box. Click inside to display the calendar.
</label>
<!-- NOTE: the following script tag is not intended for usage in real
world!! it is part of the CodeGlass and you should just remove it when
you use the code -->
<script type="text/javascript">
dojo.addOnLoad(function() {
if (document.pub) {
document.pub();
}
});
</script>
</body>