diff --git "a/\04311-5.txt\043" "b/\04311-5.txt\043" new file mode 100644 index 0000000..5397155 --- /dev/null +++ "b/\04311-5.txt\043" @@ -0,0 +1,5 @@ +getElementById(id)働き→id要素にidをもつ +getElementsByTagname(name)要素のリストがかえる +querySelector(expr)→cssセレクタexprにマッチする要素のうち最初のもの。 + +属性 \ No newline at end of file diff --git "a/\043countdown.js\043" "b/\043countdown.js\043" new file mode 100644 index 0000000..8c462e6 --- /dev/null +++ "b/\043countdown.js\043" @@ -0,0 +1,28 @@ +function CountDown() { + var random = Math.floor(Math.random()*11); + var count = 5, tmID, infobox = document.getElementById("info"),start = document.getElementById("start"),a = document.getElementById("atari"+ random); + + + function countDown() { + if (--count == 0) { + infobox.innerHTML = "失敗"; + } else { + if (count >= 0){ + infobox.innerHTML = count + "秒前"; + tmID = setTimeout(countDown, 1000); + }} + } + function startCountDown() { + tmID = setTimeout(countDown, 1000); + a.removeEventListener("click", startCountDown, false); + a.addEventListener("click", stopCountDown, false); + } + function stopCountDown() { + clearTimeout(tmID); + infobox.innerHTML = "あたり!"; + a.removeEventListener("click", stopCountDown, false); + + } + start.addEventListener("click", startCountDown, false); +}; +document.addEventListener("DOMContentLoaded", CountDown, false); diff --git "a/\043heloo.js\043" "b/\043heloo.js\043" new file mode 100644 index 0000000..7fc1390 --- /dev/null +++ "b/\043heloo.js\043" @@ -0,0 +1,8 @@ + \ No newline at end of file diff --git "a/.\04311-5.txt" "b/.\04311-5.txt" new file mode 120000 index 0000000..ec27bc0 --- /dev/null +++ "b/.\04311-5.txt" @@ -0,0 +1 @@ +c119029@roy.e.koeki-u.ac.jp.5769 \ No newline at end of file diff --git "a/.\043countdown.js" "b/.\043countdown.js" new file mode 120000 index 0000000..2442383 --- /dev/null +++ "b/.\043countdown.js" @@ -0,0 +1 @@ +c119029@roy.e.koeki-u.ac.jp.28453 \ No newline at end of file diff --git a/3.js b/3.js new file mode 100755 index 0000000..69a783f --- /dev/null +++ b/3.js @@ -0,0 +1,10 @@ +var read = readLine("urlを入力してください"); + print(read); + + function readLine(msg) { + let console = java.lang.System.console(); + let pw = console.readLine(msg); + let url = String(new java.lang.String(pw)); + let path = url.match(/^https?:\/{2,}.*?(\/.*)/)[1]; + return path; + } diff --git a/map/domon/domon.html b/map/domon/domon.html new file mode 100644 index 0000000..93e22e2 --- /dev/null +++ b/map/domon/domon.html @@ -0,0 +1,21 @@ + + + +マップ: My First Map! + + + + + + + +

My First Map!

+
+ + + + diff --git a/map/domon/domon.js b/map/domon/domon.js new file mode 100644 index 0000000..1d81eea --- /dev/null +++ b/map/domon/domon.js @@ -0,0 +1,7 @@ +/* domon.js - 北緯38.891度, 東経139.824度, ズームレベル16 で地図表示 */ + +var mymap = L.map("mymap").setView([38.891, 139.824], 16); +L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', { + attribution: + '© OpenStreetMap contributors' +}).addTo(mymap);