何時會顯示showMessage。我已經寫了一個小程序,請告訴我 爲什麼這個showmessage沒有顯示,如果顯示在哪裏會顯示?關於使用DOJO showMessage的查詢
<html>
<head>
<link rel="stylesheet" type="text/css"
href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"/>
<script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js"
djConfig="parseOnLoad: true">
</script>
<script>
dojo.require("dijit.form.DateTextBox");
</script>
<script>
function callMe()
{
if(dijit.byId("fromDate_out").isValid())
showMessage("Selected date is fine.");
else
showMessage("Not Valid");
}
</script>
</head>
<body class="claro">
<div dojoType="dijit.form.DateTextBox" require="true" id="fromDate_out" placeHolder="From Date" onChange="dijit.byId('fromDate').constraints.max =arguments[0];" ></div>
<input type="button" onclick="callMe()"/>
</body>
</html>