<script>$("#pseudo_review_time' goods_id '"). datepicker({dateFormat: "yy-mm-dd"});$("#pseudo_review_time' goods_id '").change(function(){var thetime=$(this).val();var d=new Date( Date.parse(thetime.replace(/-/g,"/")));var curDate=new Date();if(d >curDate){alert("Please select a time less than today!");$ (this).val("");$(this).focus();}});</script>
When I use it, jQuery UI is very powerful, and the date in it Choose the plug-in Datepicker to use with it, it is very useful.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn