jquery datepicker problem in include page in php
I use the following datepicker.php
page for jquery datepicker is given below:
<!DOCTYPE html>
<html>
<head>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js"></script>
</script>
<script>
$(function() {
$( "#datepicker" ).datepicker();
});
</script>
</head>
<body style=&quo开发者_如何学Pythont;font-size:62.5%;">
<input type="text" id="datepicker" />
</body>
</html>
it is working well as a single page but when i use this page from another page using include (datepicker.php
) method then the datepicker is not working. How can I solve this?
Because this function used only one page if you use datepicker on another page then define function on another page.
You should not be including a full HTML document within another HTML document. The result is not a valid webpage.
精彩评论