Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jquery 以HTML格式输入日期?_Jquery_Html - Fatal编程技术网

Jquery 以HTML格式输入日期?

Jquery 以HTML格式输入日期?,jquery,html,Jquery,Html,我知道jquery的“日期选择器”,但不知道如何实现它 我想把它用在表格中的html表单上 我的表单字段之一是 "<tr><td>Name: </td> <td><input type='text' id='name'/> </td> </tr>" + “名称:”+ 我想要一个类似的,但用于日期输入。无法真正理解您卡在哪里,因为您没有显示任何尝试代码,但这是如何完成的: $(function() {

我知道jquery的“日期选择器”,但不知道如何实现它

我想把它用在表格中的html表单上

我的表单字段之一是

"<tr><td>Name: </td> <td><input type='text' id='name'/> </td> </tr>" +
“名称:”+

我想要一个类似的,但用于日期输入。

无法真正理解您卡在哪里,因为您没有显示任何尝试代码,但这是如何完成的:

$(function() {
    $("#name").datepicker();
});
不要忘记包含
css
js
文件:

<link rel="stylesheet" href="http://code.jquery.com/ui/1.8.18/themes/base/jquery-ui.css" type="text/css" media="all" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.8.18/jquery-ui.min.js" type="text/javascript"></script>


您可以从文档中的示例开始。。。尝试阅读文档示例:对于OP:确保可以包含所有必需的文件,如jquery-ui.css、jquery核心文件、jquery-ui.js文件。谢谢大家。非常感谢。1最后一个问题,下载css和js文件,然后在本地使用src还是只使用在线文件更好?@user1261083。在线文件将缩短页面的下载时间,因为它们被广泛使用,并且已经下载。这就是它出现的原因。。。祝你好运