datepicker/javascript元素不能在每个页面上工作

datepicker/javascript元素不能在每个页面上工作,javascript,php,jquery,html,Javascript,Php,Jquery,Html,我希望这个问题对更有经验的人来说是显而易见的。 我在第一个预订页面上整合了一些表单功能,但在第二个页面上没有,我不得不从模板中修改一些,然后拼凑在一起,因此我认为其中一个脚本中存在冲突,但似乎无法找出导致第二个页面无法加载的原因,我仍然需要添加表单操作和php文件,但希望在继续之前解决这个问题 在此页面上按需要工作 但不是在 我现在已经按照建议做了一些更改-datepicker相同,但行为仍然相同,因为我不确定问题出在哪里我不确定应该发布哪些,从评论来看,这些是最合适的,在选择/选项下拉列表

我希望这个问题对更有经验的人来说是显而易见的。 我在第一个预订页面上整合了一些表单功能,但在第二个页面上没有,我不得不从模板中修改一些,然后拼凑在一起,因此我认为其中一个脚本中存在冲突,但似乎无法找出导致第二个页面无法加载的原因,我仍然需要添加表单操作和php文件,但希望在继续之前解决这个问题

在此页面上按需要工作

但不是在

我现在已经按照建议做了一些更改-datepicker相同,但行为仍然相同,因为我不确定问题出在哪里我不确定应该发布哪些,从评论来看,这些是最合适的,在选择/选项下拉列表js中似乎有一个错误,关于如何更正有什么想法吗

html第1页

    <!DOCTYPE html>
<!--[if lt IE 7]> <html dir="ltr" lang="en-US" class="ie6"> <![endif]-->
<!--[if IE 7]>    <html dir="ltr" lang="en-US" class="ie7"> <![endif]-->
<!--[if IE 8]>    <html dir="ltr" lang="en-US" class="ie8"> <![endif]-->
<!--[if gt IE 8]><!--> <html dir="ltr" lang="en-US"> <!--<![endif]-->
<!-- BEGIN head -->
<head>
<!--Meta Tags-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />  
<!-- Title -->
<title>Beffay- Book Chalet</title>  <!-- Stylesheets -->
<link rel="stylesheet" href="css/style.css" type="text/css"  media="all" />
<link rel="stylesheet" href="css/css3menu1/style.css" type="text/css" /><style type="text/css">._css3m{display:none}</style>
<link rel="stylesheet" href="css/responsive.css" type="text/css"  media="all" />
<link rel="stylesheet" media="screen" href="fonts/font-awesome/font-awesome.min.css" />
<link rel="manifest" href="images/favicons/manifest.json">
<link rel="shortcut icon" href="images/favicons/favicon.ico">
<meta name="msapplication-TileColor" content="#e9edf2">
<meta name="msapplication-TileImage" content="images/favicons/mstile-144x144.png">
<meta name="msapplication-config" content="images/favicons/browserconfig.xml">
<meta name="theme-color" content="#e9edf2">
<!-- JavaScript For IE -->  
<!--[if (gte IE 6)&(lte IE 8)]>  <script type="text/javascript" src="js/selectivizr-min.js"></script>
<![endif]-->
<!-- END head -->   
</head>
<body ontouchstart="" >
<section id="titles">  
<div id="logo">   
<h1>Chalet Beffay<h1>  </div>
<input type="checkbox" id="css3menu-switcher" class="c3m-switch-input">     
<ul id="css3menu1" class="topmenu">         
<li class="switch"><label onclick="" for="css3menu-switcher"></label></li>
<li class="topfirst"><a href="index.html" style="height:19px;line-height:19px;"><span>Home</span></a>  
<ul>    <li><a href="index.html#about">About Us</a></li>    
<li><a href="index.html#news">News</a></li>  </ul></li>         
<li class="topmenu"><a href="chalet.html" style="height:19px;line-height:19px;"><span>Chalet</span></a>  
<ul>    <li><a href="chalet.html#gallery">Gallery</a></li>      
<li><a href="chalet.html#ameneties">Ameneties</a></li>      
<li><a href="chalet.html#rates">Rates</a></li>      
<li><a href="chalet.html#layout">Layout</a></li>    
<li><a href="chalet.html#brocPDF">Brochure PDF</a></li>  
</ul></li>          
<li class="topmenu"><a href="apartment.html" style="height:19px;line-height:19px;"><span>Apartment</span></a>  
<ul>    <li><a href="apartment.html#gallery">Gallery</a></li>  
<li><a href="apartment.html#ameneties">Ameneties</a></li>   
<li><a href="apartment.html#rates">Rates</a></li>   
<li><a href="apartment.html#layout">Layout</a></li>     
<li><a href="apartment.html#broaPDF">Brochure PDF</a></li>  
</ul></li>          
<li class="topmenu"><a href="location.html" style="height:19px;line-height:19px;"><span>Location</span></a>  
<ul>    <li><a href="location.html#directions">Directions</a></li>      
<li><a href="location.html#activities">Activities</a></li>  
</ul></li>          
<li class="topmenu"><a href="reviews.html" style="height:19px;line-height:19px;"><span>Reviews</span></a>  
<ul>    <li><a href="reviews.html#customers">Customers</a></li>     
<li><a href="reviews.html#reviews">Review Us</a></li>  
</ul></li>          
<li class="topmenu"><a class="pressed" href="#" style="height:19px;line-height:19px;"><span>Availability</span></a>  
<ul>    <li><a href="chalet_booking.html">Chalet</a></li>   
<li><a href="apartment_booking.html">Apartment</a></li>  
</ul></li>          
<li class="toplast"><a href="contact.html" style="height:19px;line-height:19px;">Contact Us</a></li>  
</ul>   
<!-- End css3menu.com BODY section -->
</section>  
    <hr class="space10" />
<section id="wrapper">  
<div class="clearfix" id="statichead">  
    <img src="images/calender.jpg" alt="" />          
</div>    <!-- BEGIN .content-wrapper -->
<div id="chalet">         
<div class="content-wrapper clearfix">  
    <h3 class="title-style11">Booking</h3>  <!-- BEGIN .one-third -->       
<div class="two-third clearfix">    
    <h3 class="title-style2">The Chalet</h3>    
    <p>A traditional wooden chalet built approximately 25 years ago and completely modernized by the present owners who have lived there for nearly ten years.<br>
    It provides a very comfortable and relaxing environment with stunning views.
    </p>    </div>      
<div class="one-third clearfix last-col">  
    <img src="images/chaletms.jpg" alt="" class="image-style1 respond-img" />   
</div>      
    <hr class="space7" />   <!-- BEGIN .booking-step-wrapper -->    
<div class="content-wrapper clearfix">      
<div id="bookingcal">                               
    <iframe src="./calendar/index.php" allowfullscreen></iframe>                        
</div></div>      
    <hr class="space7" />
<div class="content-wrapper clearfix ">
<div id="priceList1"><h3 class="title-style2">Rates</h3>
<div class="inset clearfix">    
    <h3><strong>Rates per week, Saturday to Saturday</strong></h3>      </div>
<div id="priceList">
<table cellspacing="0"  id="pricesTable" summary="Price List">
    <colgroup>  <col id="Times" />
    <col id="From" />
    <col id="To" />
    <col id="WeeklyPrice" />  </colgroup>
 <thead>
    <tr>    <th class="DateHeader">Dates</th>      <th class="PriceFromHeader">From</th>    <th class="PriceToHeader">To</th>   <th class="WeeklyPriceHeader">Weekly Price (Sat-Sat)</th>   </tr>
 </thead>
 <tbody>
    <tr class="">   
     <td class="DateColumn">Christmas & New Year</td>   
     <td class="PriceFromColumn">19th Dec</td>      
     <td  class="PriceToColumn">3rd January</td>    
     <td class="WeeklyPriceColumn">&pound;1,950.00</td>     
    </tr>
    <tr class="odd">    
     <td class="DateColumn">January</td>    
     <td class="PriceFromColumn">3rd January</td>   
     <td  class="PriceToColumn">30th January</td>   
     <td class="WeeklyPriceColumn">&pound;1,250.00</td>     
    </tr>
    <tr class="">   
     <td class="DateColumn">February</td>   
     <td class="PriceFromColumn">30th January</td>      
     <td  class="PriceToColumn">27th February</td>      
     <td class="WeeklyPriceColumn">&pound;1,850.00</td>     
    </tr>
    <tr class="odd">    
     <td class="DateColumn">March</td>      
     <td class="PriceFromColumn">27th Feb</td>      
     <td  class="PriceToColumn">2nd April</td>      
     <td class="WeeklyPriceColumn">&pound;1,580.00</td>     
    </tr>
    <tr class="">   
     <td class="DateColumn">April</td>      
     <td class="PriceFromColumn">2nd April</td>     
     <td  class="PriceToColumn">1st May</td>    
     <td class="WeeklyPriceColumn">&pound;1,150.00</td>     
    </tr>
    <tr class="odd">    
     <td class="DateColumn">Summer 2016</td>    
     <td class="PriceFromColumn">2nd May</td>   
     <td  class="PriceToColumn">TBC</td>    
     <td class="WeeklyPriceColumn">&pound;750.00</td>   
    </tr>
 </tbody>
</table>
<div class="inset clearfix">    
    <h3><strong>Long weekend and alternate change over days may be available subject to bookings.</strong></h3>     </div>
</div></div>        
    <h2 class=" inset booklink"><strong><i class="fa fa-asterisk"></i> 20% off <a href="apartment.html">Apartment</a> rate if booked with the Chalet</strong></h2>
    <hr class="space9" />
    </div>      
<div id="confirmation"> 
<!-- reservation1 -->
<form class="booking-form" name="bookchalet" action="booking1.html" method="post">          
<div class="booking-side-wrapper clearfix">                 
<div class="booking-side">                  <!-- BEGIN .widget -->          
<div class="widget">  
<div class="widget-reservation-box">    
<h4 class="title-style2">Reservation</h4>    
<ul><li><span>Accomodation: </span> The Chalet</li>  
    <li><span>With Apartment? </span><div id="switchbox>
<div class="switch">
<input id="cmn-toggle-1" class="cmn-toggle cmn-toggle-round" type="checkbox">
<label for="cmn-toggle-1"></label>
</div>
<div class="switch">
<input id="cmn-toggle-4" class="cmn-toggle cmn-toggle-round-flat" type="checkbox">
<label for="cmn-toggle-4"></label>
</div>
<div class="switch">
<input id="cmn-toggle-7" class="cmn-toggle cmn-toggle-yes-no" type="checkbox">
<label for="cmn-toggle-7" data-on="Yes" data-off="No"></label>
</div></li>     
    <li><span>Requested Dates: </span>       
<div class="clearfix">
<div class="one-half-form">
    <label for="open_date_from">From</label>
    <input type="text" id="datefrom" name="book_date_from" value="Check In" class="datepicker">
</div>
<div class="one-half-form last-col">
    <label for="open_date_to">To</label>
    <input type="text" id="dateto" name="book_date_to" value="Check Out"   class="datepicker">
</div></div></li>   
<li><span>Number Of Guests: </span><select id="guests"></select></li>   
<li><span>Total Days: <select id="days"></select></li>      
<li><span>Todays Date: </span>  <p id="today"></p></li> </ul>
<!-- END .widget-reservation-box -->  </div>            <!-- END .widget -->        </div>        <!-- END .content-wrapper -->  </div>
    </div>
<!-- booking form -->               
<div class="booking-main-wrapper">                  
<div class="booking-main">    
    <h4 class="title-style2">Your Details</h4>
<div class="input-left">
<label for="first_name">First Name</label>
 <input type="text" name="first_name" id="first_name">
<label for="last_name">Last Name</label>
 <input type="text" name="last_name" id="last_name">    
<label for="email_address">Email Address</label>
 <input type="text" name="email_address" id="email_address">
<label for="phone_number">Telephone Number</label>
 <input type="text" name="phone_number" id="phone_number">
<label for="address_line1">Address Line 1</label>
 <input type="text" name="address_line1" id="address_line1">
    </div>
<div class="input-right">
<label for="address_line2">Address Line 2</label>
 <input type="text" name="address_line2" id="address_line2">
<label for="city">City</label>
 <input type="text" name="city" id="city">
<label for="state_county">State / County</label>
 <input type="text" name="state_county" id="state_county">
<label for="zip_postcode">Zip / Postcode</label>
 <input type="text" name="zip_postcode" id="zip_postcode">
<label for="country">Country</label>
 <input type="text" name="country" id="country">
    </div>
<label for="special_requirements">Special Requirments</label>   
 <textarea name="special_requirements" id="special_requirements" rows="10"></textarea>
<p class="terms"><input type="checkbox" name="terms"> I confirm I have read and agree to the <a href="#" style="color:#CC0000;font-weight:800;">terms and conditions</a> and wish to place a booking</p>
<div class="clearfix"></div>
    <input class="button1" type="submit" value="Request Booking Now" />    </form>          <hr class="space4"/>        </div>              </div>
</section>      
<!-- BEGIN #footer -->  <div id="footer">       <!-- BEGIN .content-wrapper -->     <div class="content-wrapper clearfix">                                      <!-- BEGIN #footer-bottom -->       <div id="footer-bottom" class="clearfix">
<nav class="secondary-navigation">      
<ul class="fr">
<li><a href="chalet.html">Chalet</a><span>/</span></li>
<li><a href="apartment.html">Apartment</a><span>/</span></li>
<li><a href="chalet_booking.html">Book Now</a><span>/</span></li>
<li><a href="location.html#directions">Directions &amp; Map</a><span>/</span></li>      
</ul>  </nav>    <!-- END .clearfix -->
</div> </div>       
<footer id="copyright">             
<div class="dyst">      
<p class="fl">&copy; Web adaptation, styling and graphics by</p><a href="http://www.dystopiart.co.uk" target="_blank"><img src="images/DystopiART_Small.png" alt="DystopiART"></a>  
</div>  
<div class="social"><a href="https://www.facebook.com/pages/Beffay" class="link facebook" target="_blank"><span class="fa fa-facebook-square"></span></a>     
</div>  
<div class="rounded-corners scroll">    
<span class="to-top"><a href="#logo"><i class="fa fa-angle-up fa-2x">
</i></a></span>  </div>             
</footer>
</div></div></div></div></div>
<!-- Smooth Scroll -->
<script src="js/smooth-scroll.js"></script>
<!-- JavaScript -->
<script type="text/javascript" src="js/jquery-1.9.1.js"></script>
<script type='text/javascript' src='js/jquery-ui.js'></script>
<script type="text/javascript" src="js/superfish.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>    
<!-- END body -->
</body>
</html>

贝菲书屋
.css3m{显示:无}
贝菲小屋

它提供了一个非常舒适和放松的环境,视野极佳。


星期六至星期六的每周费率 日期从到每周价格(Sat) 圣诞节和新年 12月19日 1月3日 &磅;1,950.00 一月 1月3日 1月30日 &磅;1,250.00 二月 1月30日 2月27日 &磅;1,850.00 前进 2月27日 4月2日 &磅;1,580.00 四月 4月2日 5月1日 &磅;1,150.00 2016年夏季 5月2日 未完待续 &磅;750 根据预订情况,可能会提供长周末和隔天换车。 如果在小屋预订,可享受20%的折扣
  • 有公寓吗 你必须检查你的JS控制台。“不工作”页面上存在javascript错误:

    TypeError:select为空

    选择.options.add(选项)

    TypeError:$(…)。flexslider不是函数

    $('.text slider').flexslider({


    从以上两个链接中,我能理解的是这个页面上的表单 支持datetimepicker,但datatimepicker不支持此页上的表单,原因是,我只是尝试检查脚本文件,但在第二个字段的日期字段上找不到绑定datetimepicker的代码。 只需尝试将以下代码添加到脚本文件中

    $('#datefrom2').datepicker();
    $('#dateto2').datepicker();
    

    请稍微编辑一下您的js/scripts.js 替换此代码:

        $(".datepicker",".datepicker2").datepicker();
    
        $(".datepicker").datepicker();
    
    使用此代码:

        $(".datepicker",".datepicker2").datepicker();
    
        $(".datepicker").datepicker();
    
    在这一页
    为日期字段提供与“datepicker”相同的类

    这将真正有助于在dateStart.set('value',dateFormat)发布您遇到问题的代码;出现在控制台中mootoolsupblic.js的第56行,这是我第一次发布,所以请让我知道我需要添加的任何其他内容或所需信息,任何帮助都会按照建议进行修改,不幸的是没有更改这两个页面似乎都支持datepicker现在进行了更改,所以现在只引用同一个datepicker-我添加它是为了尝试nd解决问题失败。也尝试了相同页面的副本1,仍然不会在第二个页面上运行javascript或jquery。我已将js文件添加到问题中以了解更多信息,选择选项已从另一个线程改编[链接](