struts2 js取sx:datetimepicker 值

<div align="center"><sx:datetimepicker label="Start_Time" id="Start_Time" name="Start_Time1"   displayFormat="yyyy/MM/dd" /></div>
<div align="center"><sx:datetimepicker label="End_Time" name="End_Time" displayFormat="yyyy/MM/dd"/></div>
<input id="test" type="text" >
<script language="Javascript">
function myFunction(){
   alert("begin");
        var testdate= dojo.widget.byId("Start_Time");
        alert(testdate.getValue());
   return false;
}
</script>
   <s:submit value="Add" onclick="return myFunction();"/>
         </div>

     </body>
 

你可能感兴趣的:(java,dojo)