猿问

我有通过 JQuery 的日期选择器文本框,但日期选择器不工作

Jquery 日期选择器不工作。这是我的代码。我知道我要么丢失了一些 JS 文件,要么包含了一些覆盖 JS 文件,但我想知道是哪一个。


请检查我的代码,让我知道我遗漏了什么或在阻止 jquery 日期选择器的 js 文件中额外添加了什么。虽然,它之前可以工作,但是在代码重构之后,它就停止工作了


<html>

<head>

<meta charset="ISO-8859-1">

<meta name="viewport" content="width=device-width, initial-scale=1">

<link href="./css/bootstrap-theme.css" rel='stylesheet' type='text/css' />

 <link href="./css/bootstrap.min.css" rel='stylesheet' type='text/css' /> 

<link href="./css/lightbox.min.css" rel='stylesheet' type='text/css' />

<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.6.4/css/bootstrap-datepicker.css" rel='stylesheet' type='text/css' /> -->

<link href="./css/chosen.css" rel='stylesheet' type='text/css' />

<link type='text/css' rel='stylesheet' href="./css/angular-bootstrap-lightbox.min.css"/>

<link href="./css/font-awesome.min.css" rel='stylesheet' type='text/css' />

<link href="./css/select2.min.css" rel='stylesheet' type='text/css' />

<link rel="stylesheet" href="./css/flexslider.css">

<link rel="stylesheet" type="text/css" href="./css/circle.css">

<link href="./css/style.css" rel='stylesheet' type='text/css' />

<script src="./js/jquery.js"></script>

<script type="text/javascript" src="./js/bootstrap.min.js"></script>

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">


慕的地10843
浏览 118回答 1
1回答

米脂

检查这个,<!DOCTYPE html><html><head>&nbsp; <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"><link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/css/bootstrap-datepicker.css" rel='stylesheet' type='text/css' /><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script><script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.9.0/js/bootstrap-datepicker.min.js"></script></head><body>&nbsp;&nbsp;&nbsp; <div >&nbsp; &nbsp;<input type="text"&nbsp; class="form-control datepicker" readonly>&nbsp; </div><script>$(document).ready(function () {&nbsp; $('.datepicker').datepicker({&nbsp; &nbsp; &nbsp; format: 'dd-M-yyyy',&nbsp; });&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;});</script></body></html>
随时随地看视频慕课网APP

相关分类

Java
我要回答