问题描述
之前项目启动都正常,但是今天突然出现时间控件不显示并且出现脚本报错:脚本如下:<linkrel="stylesheet"href="/alipayukey/struts/xhtml/styles.css"type="text/css"/><scripttype="text/javascript">//DojoconfigurationdjConfig={baseRelativePath:"/alipayukey/struts/dojo",isDebug:false,bindEncoding:"UTF-8",debugAtAllCosts:true//notneeded,butallowstheVenkmandebuggertoworkwiththeincludes};</script><scripttype="text/javascript"src="/alipayukey/struts/dojo/dojo.js"></script><scripttype="text/javascript"src="/alipayukey/struts/simple/dojoRequire.js"></script></head><scriptlanguage="javascript">$(document).ready(function(){dojo.widget.byId("startDateUkeyInit").setValue(newDate()-6*30*24*60*60*1000);dojo.widget.byId("endDateUkeyInit").setValue(newDate()--24*30*24*60*60*1000);detectKeys();});</script><tr><td>起始日期:<scripttype="text/javascript">dojo.require("dojo.widget.DatePicker");</script><divdojoType="dropdowndatepicker"id="startDateUkeyInit"name="startDateUkeyInit"inputName="startDateUkeyInit"displayFormat="yyyy-MM-dd"saveFormat="rfc"></div> 截止日期:<scripttype="text/javascript">dojo.require("dojo.widget.DatePicker");</script><divdojoType="dropdowndatepicker"id="endDateUkeyInit"name="endDateUkeyInit"inputName="endDateUkeyInit"displayFormat="yyyy-MM-dd"saveFormat="rfc"></div></td></tr>
解决方案
解决方案二:
dojo对象加载错误,看看这篇文章http://www.2cto.com/kf/201304/203142.html
解决方案三:
dojo加载进来没?这个你调试看看ba
解决方案四:
看看有没有加载dojo