亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jquery獲取當前日期的方法

 更新時間:2015年01月14日 08:55:53   投稿:shichen2014  
這篇文章主要介紹了jquery獲取當前日期的方法,涉及針對日期時間的操作技巧,具有一定參考借鑒價值,需要的朋友可以參考下

本文實例講述了jquery獲取當前日期的方法。分享給大家供大家參考。

具體如下:

復制代碼 代碼如下:
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>jquery當前日期</title>
<script type="text/javascript" src="jquery-1.8.2.min.js"></script>
<script type="text/javascript">
 $(function(){
  function show(){
   var mydate = new Date();
   var str = "" + mydate.getFullYear() + "年";
   str += (mydate.getMonth()+1) + "月";
   str += mydate.getDate() + "日";
   return str;
  }
  $("input[type='button']").click(function(){
   $("p").html("今天是 " + show());
  });
 });
</script>
</head>
<body>
<input type="button" value="看看現(xiàn)在的時間" />
<p></p>
</body>
</html>

PS:這里再為大家推薦幾款時間及日期相關在線工具供大家參考使用:

在線日期/天數(shù)計算器:
http://tools.jb51.net/jisuanqi/date_jisuanqi

在線日期計算器/相差天數(shù)計算器:
http://tools.jb51.net/jisuanqi/datecalc

在線日期天數(shù)差計算器:
http://tools.jb51.net/jisuanqi/onlinedatejsq

Unix時間戳(timestamp)轉換工具:
http://tools.jb51.net/code/unixtime

希望本文所述對大家的jQuery程序設計有所幫助。

相關文章

最新評論