支援訓練 32日目
補色
金色のイメージ
margin-bottom, padding-bottomだけで調節する。
htmlは、content -> navの順に書く。
Webサイト制作学習記録
- [JQ]APIと共存
↑ GoogleAPIでjQueryが読めなかったら、ローカルに用意したファイルを利用する方法
- [JS]Dateオブジェクト
引数が入らないときは、コンピュータの内部の日付になる。
<!DOCTYPE HTML> <html lang="ja"> <head> <meta charset="utf-8"> <title>オブジェクトを生成する</title> </head> <body> <script> var now; now = new Date(); document.write('<h1>' + now.toString() + '</h1>'); </script> </body> </html>
月の指定に注意。
<!DOCTYPE HTML> <html lang="ja"> <head> <meta charset="utf-8"> <title>オブジェクトを生成する</title> </head> <body> <script> var aDay; aDay = new Date(2013, 7, 20, 15, 55, 50); document.write('<h1>' + aDay.toString() + '</h1>'); </script> </body> </html>
今日の和暦を表示する
<!DOCTYPE HTML> <html lang="ja"> <head> <meta charset="utf-8"> <title>オブジェクトを生成する</title> </head> <body> <script> var now, heisei, theDay; now = new Date(); heisei = now.getFullYear() - 1988; theDay = '平成' + heisei + '年' + (now.getMonth() + 1) + '月' + now.getDate() + '日'; document.write('<h1>' + theDay + '</h1>'); </script> </body> </html>
配列を利用して曜日を取得する。
<!DOCTYPE HTML> <html lang="ja"> <head> <meta charset="utf-8"> <title>オブジェクトを生成する</title> </head> <body> <script> var now, heisei, theDate; var days = new Array('日', '月', '火', '水', '木', '金', '土'); now = new Date(); heisei = now.getFullYear() - 1988; theDay = days[now.getDay()]; theDate = '平成' + heisei + '年' + (now.getMonth() + 1) + '月' + now.getDate() + '日' + ' (' + theDay + ') '; document.write('<h1>' + theDate + '</h1>'); </script> </body> </html>
<!DOCTYPE HTML> <html lang="ja"> <head> <meta charset="utf-8"> <title>来年の今日の曜日を求める</title> </head> <body> <script> var theDate1, theDay2; var days = new Array('日', '月','火', '水', '木', '金', '土'); theDate1 = new Date(); theDate1.setFullYear(theDate1.getFullYear() + 1); document.write('<h1>一年後の今日は' + days[theDate1.getDay()] + '曜日です</h1>'); </script> </body> </html>
ランディングページ(LPO)
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico">