Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>ボタンが押されるとカウントアップするデモ</title>
</head>
<body>
<p id="counter">0</p>
<form>
<input id="btn_countup" type="button" value="カウントアップ!">
h2{
color: #333;
font-size: 120%;
font-weight: normal;
margin-top: 3em;
}
h2:first-child{
margin-top: 1em;
}
textarea{
h2{
color: #333;
font-size: 120%;
font-weight: normal;
margin-top: 3em;
}
h2:first-child{
margin-top: 1em;
}
textarea{
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<form>
<input type="text" id="input">
<input type="button" id="btn" value="push to start">
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<form>
<input type="text" id="input_a" placeholder="一つ目の文章">
<input type="text" id="input_b" placeholder="二つ目の文章">
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<h2>偶数を探します</h2>
<p>1から入力された数までの間にある偶数をすべて列挙します。</p>
<form id="input_form">
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<p>
判定する年:
<input type="text" id="year" value="2013">
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<button id="btn">スタート</button>
<ul id="list"></ul>
</body>
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<input type="text" id="input">
<button id="btn">スタート</button>
<ul id="list"></ul>
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<div>
<input type="text" id="name">
<button id="btn">追加</button>