NO IMAGE

jQuery 日時を表示

$(function(){
	$("要素").text(new Date());
});

@See
http://www.webdlab.com/guide/jquery-new-date/

 

  var now = new Date();
  var y = now.getFullYear();
  var m = now.getMonth() + 1;
  var d = now.getDate();
  var w = now.getDay();
  var wd = ["日", "月", "火", "水", "木", "金", "土"];
  var h = now.getHours();
  var mi = now.getMinutes();
  var s = now.getSeconds();
	$("要素").text(y + "年" + m + "月" + d + "日" + h + "時" + mi + "分" + s + "秒" + "(" + wd[w] + ")");
});

リアルタイムだと

$(function(){
setInterval(function(){
  var now = new Date();
  var y = now.getFullYear();
  var m = now.getMonth() + 1;
  var d = now.getDate();
  var w = now.getDay();
  var wd = ["日", "月", "火", "水", "木", "金", "土"];
  var h = now.getHours();
  var mi = now.getMinutes();
  var s = now.getSeconds();
	$(".要素").text(y + "年" + m + "月" + d + "日" + h + "時" + mi + "分" + s + "秒" + "(" + wd[w] + ")");
}, 1000);
});

 

NO IMAGE
最新情報をチェックしよう!

    Warning: Trying to access array offset on value of type bool in /home/xsvx1010357/kato.space/public_html/wp/wp-content/themes/the-thor/template-parts/single-prevnext.php on line 37

    Warning: Trying to access array offset on value of type bool in /home/xsvx1010357/kato.space/public_html/wp/wp-content/themes/the-thor/template-parts/single-prevnext.php on line 38

    Warning: Trying to access array offset on value of type bool in /home/xsvx1010357/kato.space/public_html/wp/wp-content/themes/the-thor/template-parts/single-prevnext.php on line 39

  • Warning: Trying to access array offset on value of type bool in /home/xsvx1010357/kato.space/public_html/wp/wp-content/themes/the-thor/template-parts/single-prevnext.php on line 83

    Warning: Trying to access array offset on value of type bool in /home/xsvx1010357/kato.space/public_html/wp/wp-content/themes/the-thor/template-parts/single-prevnext.php on line 84

    Warning: Trying to access array offset on value of type bool in /home/xsvx1010357/kato.space/public_html/wp/wp-content/themes/the-thor/template-parts/single-prevnext.php on line 85
>最強のWordPressテーマ「THE THOR」

最強のWordPressテーマ「THE THOR」

システムの構築・保守運用「   」 社内システム担当が欲しいが、専属で雇うほどの仕事量はない。 必要な時に必要なだけ頼りたいというお悩みを持つ企業様へ専門知識を持って対応を行っております。 サーバから各種システムまで自社・他社で構築されたシステムに対してサポートを行っております。

CTR IMG