http://www.hksygm.com/zh-cn/,在仿这个站的时候,对于这个订房表单产生了兴趣。就研究了一下。先用dede的自定义表单把字段都弄好,但是如何调用日期犯了愁!在官方dede论坛,只找到一句回复,就是这种效果是通过日期js实现,但是找了两天也不知道js的名称,就仔细看了目标站的js,发现了js的出处,http://www.my97.net/,my97日期控件。然后问题迎刃而解!下载最新控件包!然后把表单里的name换成自己的字段,就大功告成了!<div class="right_box"><b class="rb_top"></b><ul class="rb_centent"> <div class="rightsearch"> <h3> 查询房费及预订</h3> <script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script> <style> input.text_2 { background-color: #FFFFFF; border: 1px solid #7D9EC0; color: #333333; height: 15px; line-height: 15px; padding: 0 2px; width:100px;}</style><ul> <form action="/plus/diy.php" enctype="multipart/form-data" method="post"><input type="hidden" name="action" value="post" /><input type="hidden" name="diyid" value="1" /><input type="hidden" name="do" value="2" /> <li class="li_date"> <label>抵达日期</label><input type="text" style="width:100px;" class="text_1 wdate" id="rbot_txtCheckInDate" name="didariqi"></li> <li class="li_date"> <label>退房日期</label><input type="text" style="width:100px;" class="text_1 wdate" id="rbot_txtCheckOutDate" name="tuifangqiri"></li> <li class="li_quantity"> <label> 间数/成人</label><select style="width: 40px;" id="ddlRooms" name="fangjianshu"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> <select style="width: 40px;" id="ddlAdultNum" name="chengrenshu"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> </li> <li class="li_roomtype"> <label>房型</label><select style="width:105px;" id="rbot_ddlHotelRoom" name="fangxing"> <option value='商务标准间'>商务标准间</option><option value='三人间'>三人间</option><option value='大床房'>大床房</option><option value='豪华套房'>豪华套房</option></select></li> <li class="li_date"> <label>电话/手机</label> <input name="dianhua" class="text_2" type="text" ></li> <li class="li_submit"> <input type="hidden" name="dede_fields" value="didariqi,text;tuifangriqi,text;fangjianshu,select;chengrenshu,select;ertongnianling,select;fangxing,select;kidsnum,select;dianhua,text" /><input type="hidden" name="dede_fieldshash" value="190db4a6e1ae0cacca378739e8128633" /><input type="submit" name="submit" value="提 交" class="sub_search" /></li></form> </ul> </div></ul><b class="rb_bottom"></b></div>为了升级下模板 我在努力回复 呵呵http://www.hksygm.com/zh-cn/,在仿这个站的时候,对于这个订房表单产生了兴趣。就研究了一下。先用dede的自定义表单把字段都弄好,但是如何调用日期犯了愁!在官方dede论坛,只找到一句回复,就是这种效果是通过日期js实现,但是找了两天也不知道js的名称,就仔细看了目标站的js,发现了js的出处,http://www.my97.net/,my97日期控件。然后问题迎刃而解!下载最新控件包!然后把表单里的name换成自己的字段,就大功告成了!<div class="right_box"><b class="rb_top"></b><ul class="rb_centent"> <div class="rightsearch"> <h3> 查询房费及预订</h3> <script language="javascript" type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script> <style> input.text_2 { background-color: #FFFFFF; border: 1px solid #7D9EC0; color: #333333; height: 15px; line-height: 15px; padding: 0 2px; width:100px;}</style><ul> <form action="/plus/diy.php" enctype="multipart/form-data" method="post"><input type="hidden" name="action" value="post" /><input type="hidden" name="diyid" value="1" /><input type="hidden" name="do" value="2" /> <li class="li_date"> <label>抵达日期</label><input type="text" style="width:100px;" class="text_1 wdate" id="rbot_txtCheckInDate" name="didariqi"></li> <li class="li_date"> <label>退房日期</label><input type="text" style="width:100px;" class="text_1 wdate" id="rbot_txtCheckOutDate" name="tuifangqiri"></li> <li class="li_quantity"> <label> 间数/成人</label><select style="width: 40px;" id="ddlRooms" name="fangjianshu"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> <select style="width: 40px;" id="ddlAdultNum" name="chengrenshu"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> <option value="6">6</option> <option value="7">7</option> <option value="8">8</option> <option value="9">9</option> <option value="10">10</option> </select> </li> <li class="li_roomtype"> <label>房型</label><select style="width:105px;" id="rbot_ddlHotelRoom" name="fangxing"> <option value='商务标准间'>商务标准间</option><option value='三人间'>三人间</option><option value='大床房'>大床房</option><option value='豪华套房'>豪华套房</option></select></li> <li class="li_date"> <label>电话/手机</label> <input name="dianhua" class="text_2" type="text" ></li> <li class="li_submit"> <input type="hidden" name="dede_fields" value="didariqi,text;tuifangriqi,text;fangjianshu,select;chengrenshu,select;ertongnianling,select;fangxing,select;kidsnum,select;dianhua,text" /><input type="hidden" name="dede_fieldshash" value="190db4a6e1ae0cacca378739e8128633" /><input type="submit" name="submit" value="提 交" class="sub_search" /></li></form> </ul> </div></ul><b class="rb_bottom"></b></div> |