jQuery part of the code:
< script type="text/javascript">
function current(){
var d=new Date(),str='';
str =d.getFullYear() 'year'; // Get the current year
str =d.getMonth() 1 'month'; //Get the current month (0-11)
str =d.getDate() 'day';
str =d. getHours() 'hours';
str =d.getMinutes() 'minutes';
str =d.getSeconds() 'seconds';
return str; }
setInterval(function() {$("#nowTime").html(current)},1000);
html part of the code:
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