Home >Web Front-end >HTML Tutorial >HTML time control_html/css_WEB-ITnose
When making forms, you sometimes need to enter time. In order to avoid the trouble of inputting, you can choose some ready-made time controls. This article provides a simple example. The sample code is as follows: (To run successfully, you need to maintain the directory structure corresponding to this article). js/css/.
<!DOCTYPE html><html><meta charset="utf8"> </meta><head> 这是汉字 </head><script src="js/jquery.js"> </script><script src="js/jquery.datetimepicker.js"> </script><link rel="stylesheet" href="css/jquery.datetimepicker.css"/><body><h3>Destroy DateTimePicker</h3><input type="text" id="datetimepicker6"/><!--<input id="destroy" type="button" value="destroy"/>--!></body><script>$('#datetimepicker6').datetimepicker();//$('#destroy').click(function(){// if( $('#datetimepicker6').data('xdsoft_datetimepicker') ){// $('#datetimepicker6').datetimepicker('destroy');// this.value = 'create';// }else{// $('#datetimepicker6').datetimepicker();// this.value = 'destroy';// }//});</script></html>The core one is the introduction of js code and css style, which is all the content included in the imported control. You can get datetimepicker from here, just get the three js files mentioned above in this article, import them where needed
, and you can use it. It should be noted that do not ignore the at the beginning. For the sake of depth, try removing it without leaving it!