我正在创建一个 PHP 表单,因此我将 PHP 头文件包含到我的索引页面中。所有文件都正确加载,除了 jquery 日期选择器文件未加载,如果将所有 jquery CDN 文件放入索引页面,它就可以正常工作。但是我无法在索引页中添加所有代码。所以帮帮我吧<?php<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet" type="text/css" /><link href="https://cdn.rawgit.com/mdehoog/Semantic-UI/6e6d051d47b598ebab05857545f242caf2b4b48c/dist/semantic.min.css" rel="stylesheet" type="text/css" /><script src="https://code.jquery.com/jquery-2.1.4.js"></script><script src="https://cdn.rawgit.com/mdehoog/Semantic-UI/6e6d051d47b598ebab05857545f242caf2b4b48c/dist/semantic.min.js"></script><script src="js/custom.js"></script>?><?php include 'inc/header.php';?><div class="ui calendar" id="example1"><div class="ui input left icon"><i class="calendar icon"></i><input type="text" placeholder="Date/Time"></div></div>// $('#example1').calendar();$('#example2').calendar({ type: 'date'});$('#example3').calendar({ type: 'time'});$('#rangestart').calendar({ type: 'date', endCalendar: $('#rangeend')});$('#rangeend').calendar({ type: 'date', startCalendar: $('#rangestart')});$('#example4').calendar({ startMode: 'year'});$('#example5').calendar();$('#example6').calendar({ ampm: false, type: 'time'});$('#example7').calendar({ type: 'month'});$('#example8').calendar({ type: 'year'});$('#example9').calendar();$('#example10').calendar({ on: 'hover'});var today = new Date();$('#example11').calendar({ minDate: new Date(today.getFullYear(), today.getMonth(), today.getDate() - 5), maxDate: new Date(today.getFullYear(), today.getMonth(), today.getDate() + 5)});$('#example12').calendar({ monthFirst: false});$('#example13').calendar({ monthFirst: false, formatter: { date: function (date, settings) { if (!date) return ''; var day = date.getDate(); var month = date.getMonth() + 1; var year = date.getFullYear(); return day + '/' + month + '/' + year; } }我想通过 php 文件包含 datepicker js 和 css 文件,而不是将所有 cdn 文件放入 index.php
1 回答
- 1 回答
- 0 关注
- 218 浏览
添加回答
举报
0/150
提交
取消