<input id="txtbegubdate" runat="server" class="Wdate" type="text" onfocus="var txtenddate=$dp.$('<%= txtenddate.ClientID%>');WdatePicker({onpicked:function(){txtenddate.focus();},maxDate:'#F{$dp.$D(\'txtenddate\')}'})"/>
至
<input id="txtenddate" runat="server" class="Wdate" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'<%=txtbegubdate.ClientID%>\')}'})"/>
《HTML代码》
订单日期:
<input name="ctl00$mainBody$txtbegubdate" type="text" id="ctl00_mainBody_txtbegubdate" class="Wdate" onfocus="var txtenddate=$dp.$('<%= txtenddate.ClientID%>');WdatePicker({onpicked:function(){txtenddate.focus();},maxDate:'#F{$dp.$D(\'txtenddate\')}'})" />
至
<input name="ctl00$mainBody$txtenddate" type="text" id="ctl00_mainBody_txtenddate" class="Wdate" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'<%=txtbegubdate.ClientID%>\')}'})" />
你可以看下这里的帮助:
http://www.my97.net/dp/demo/index.htm
另外,可以把这一段直接Response.Write出来:
<input id="txtenddate" runat="server" class="Wdate" type="text" onfocus="WdatePicker({minDate:'#F{$dp.$D(\'<%=txtbegubdate.ClientID%>\')}'})"/>