Skip to content

アクセスカウンタの見た目だけ#13

Open
KazuyaMiyashita wants to merge 1 commit intomasterfrom
access-counter
Open

アクセスカウンタの見た目だけ#13
KazuyaMiyashita wants to merge 1 commit intomasterfrom
access-counter

Conversation

@KazuyaMiyashita
Copy link
Contributor

No description provided.

Comment on lines +4 to +11
function showCounter(num, length) {
const numstr = (num + '').padStart(length, '0');
var html = "";
numstr.split("").forEach(n => {
html += "<img src=\"img/e" + n + ".gif\">";
});
dvd.innerHTML = html;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

innerHTMLこわいので、createElementしてattribute設定してappendする処理にした方がいいかも

<h1>Serviver Agent</h1>
<div class="description">サバイバーエージェントはベンチャースピリットを持ったEitherT集団です</div>
<div id="access-counter">
<img src="img/e0.gif"><img src="img/e1.gif"><img src="img/e2.gif"><img src="img/e3.gif"><img src="img/e4.gif"><img src="img/e5.gif"><img src="img/e6.gif"><img src="img/e7.gif"><img src="img/e8.gif"><img src="img/e9.gif">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここを動的に追加したいので直接書かずにjsから追加したい!

@tabuchik tabuchik removed their request for review July 13, 2022 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants