Skip to content

Instantly share code, notes, and snippets.

@ifukazoo
Created March 30, 2014 13:52
Show Gist options
  • Select an option

  • Save ifukazoo/9873083 to your computer and use it in GitHub Desktop.

Select an option

Save ifukazoo/9873083 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>JavaScript</title>
<style type="text/css" media="all">
h1,h2 {
color: blue;
font-style: italic;
}
#forcss{
font-weight: bold;
text-align: center;
padding: 10px;
border: solid green 5px;
}
#filecontent, #postcontent{
text-align: center;
padding: 10px;
border: solid 1px;
}
</style>
<script src="example.js"></script>
</head>
<body>
<!-- 15.9 HTMLフォーム -->
<div> <form id="buttonForm">ボタン:<input type="button" name="mybutton" value="ボタン"> </form> </div>
<div> <form id="textForm">テキスト:<input type="text" name="mytext" value="テキスト"> current text = <span id="changeText"></span></form></div>
<div> <form id="fileForm">ファイル:<input type="file" name="myfile" value="file"> </form> </div>
<div> <form id="submitForm">送信:<input type="submit" name="mysubmit" value="送信" method="POST"> </form> </div>
<div>onmouseover = <span id="onmouseover"></span></div>
<div>onfocus = <span id="onfocus"></span></div>
<div>onblur = <span id="onblur"></span></div>
<div>onclick = <span id="onclick"></span></div>
<hr>
<!-- 15.9.4 〜 -->
<div> <button>ボタン</button> </div> <!-- button要素のボタン -->
<form id="toggle">
<div> <input type="checkbox" name="check" value="checkbox1">チェックボックス1</div>
<div> <input type="checkbox" name="check" value="checkbox2">チェックボックス2</div>
<div>checked = <span id="checked"></span></div>
<div> <input type="radio" name="radio" value="radio1">ラジオボタン1</div>
<div> <input type="radio" name="radio" value="radio2">ラジオボタン2</div>
<div> <input type="submit" name="submit"></div>
<div>selected = <span id="selected"></span></div>
</form>
<hr>
<!-- 16 〜 -->
<div id="forcss">
<h2>When in Roma,do as the Romans do.</h2>
</div>
<hr>
<!-- 17.2 〜 -->
<div> <button id="button17_2">Click me</button> </div>
<div>x = <span id="clientx"></span> y = <span id="clienty"></span></div>
<hr>
<!-- 18 〜 -->
<div> <button id="button18_1">get file data</button></div>
<div id="filecontent"></div>
<div> <button id="button18_2">post</button> <input type="text" id="post_text"> post status code = <span id="postresult"></span></div>
<div> <button id="button18_3">get post data</button></div>
<div id="postcontent"></div>
<div> <input id="button18_4" type="file" /> post status code = <span id="fileresult"></span></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment