为什么DOjo日期选择器不会来

时间:2011-06-02 00:23:11

标签: dojo

<html>
<head>
    <script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djConfig="parseOnLoad: true"/>
    <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css" />
    <script type="text/javascript">
        dojo.require("dijit.form.DateTextBox");
    </script>
</head>
<body>
    <label for="fromDate">Fromfd:</label>
    <input id="fromDate" type="text" name="fromDate" dojoType="dijit.form.DateTextBox" required="true" onChange="dijit.byId('toDate').constraints.min = arguments[0];"/>
</body>
</html>

1 个答案:

答案 0 :(得分:4)

您必须正确关闭脚本标记。正确用法:

<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"
    djConfig="parseOnLoad: true">
</script>

使用普通XHTML空标记样式关闭脚本标记时不起作用。为什么?点击这里:

Why don't self-closing script tags work?