htmlとjavascriptを使った時計アプリ
解決したいこと
javaがうまく動かない
発生している問題・エラー
<style>
body{
text-align: center;
}
</style>
<head>
<meta charset="utf-8">
<script src="javascript/nowtime.js"></script>
</head>
<body>
<h2>時計</h2>
<h3>今日は</h3> <span id="nowday"></span> <h3>です。</h3>
<span id="nowtimeclock">※ここに時計が表示されます。</span>
</body>
function nowtime()
{
var twoDigit =function(num){
var digit
if( num < 10 )
{ digit = "0" + num; }
else { digit = num; }
return digit;
}
var weeks = new Array("Sun","Mon","Thu","Wed","Thr","Fri","Sat");
var now = new Date();
var year = now.getFullYear();
var month = twoDigit(now.getMonth() + 1)
var day = twoDigit(now.getDate());
var week = weeks[now.getDay()];
var hour = twoDigit(now.getHours());
var minute = twoDigit(now.getMinutes());
var second = twoDigit(now.getSeconds());
document.getElementById("nowday").textContent = year + "/" + month + "/" + day + " (" + week + ")";
document.getElementById("nowtimeclock").textContent = hour + ":" + minute + ":" + second;
}
setInterval(nowtime, 1000);
//= require jquery
//= require jquery_ujs
//= require_tree .
GET http://localhost:3000/net::ERR_ABORTED 404 (Not Found)
がエラーで出ます
```
自分で試したこと
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
方式から変えてみました