我已经设置了jquery datetimepicker,但它在localhost中无法正确显示(但在线是可以的)。图1是datetimepicker localhost,图2是datetimepicker online:
谁有理想? 谢谢!
答案 0 :(得分:0)
请检查您是否包含以下文件:
1. jquery-ui-1.8.custom.css
2. jquery-1.7.1.min.js
3. jquery-ui-1.8.custom.min.js
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>DistribuTix</title>
<meta http-equiv="expires" content="">
<meta http-equiv="ImageToolbar" content="No">
<link href="css/style.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" media="all" type="text/css" href="css/ui-lightness/jquery-ui-1.8.custom.css" />
<script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.custom.min.js"></script>
<style type="text/css">
#ui-datepicker-div{ font-size: 80%; }
/* css for timepicker */
#ui-timepicker-div dl{ text-align: left; }
#ui-timepicker-div dl dt{ height: 25px; }
#ui-timepicker-div dl dd{ margin: -25px 0 10px 65px; }
</style>
</head>
<body>
<input name="eventDate" id="eventDate" maxlength="20" size="17">
</body>
<script type="text/javascript">
$('#eventDate').datepicker({
dateFormat: 'mm-dd-yy',
showOn: "button",
buttonImage: "../images/calendar.gif",
buttonImageOnly: true
});
</script>
</html>
同时检查包含的文件是否在正确的路径中..