{"id":367,"date":"2014-10-23T22:16:42","date_gmt":"2014-10-23T13:16:42","guid":{"rendered":"http:\/\/nantoka.filmm.info\/blog\/?p=367"},"modified":"2014-10-24T13:50:20","modified_gmt":"2014-10-24T04:50:20","slug":"html5%e5%85%a5%e9%96%80%e3%81%9d%e3%81%ae19-%e3%82%bf%e3%83%83%e3%83%81%e3%81%a7%e3%81%8a%e7%b5%b5%e3%81%8b%e3%81%8d4","status":"publish","type":"post","link":"https:\/\/nantoka.filmm.info\/blog\/?p=367","title":{"rendered":"HTML5\u5165\u9580\u305d\u306e19-\u30bf\u30c3\u30c1\u3067\u304a\u7d75\u304b\u304d4"},"content":{"rendered":"<p>\u30bf\u30c3\u30c1\u304a\u7d75\u304b\u304d\u3082\u307e\u3082\u306a\u304f\u7d42\u4e86\u3067\u3059\uff0e<\/p>\n<p>\u307e\u305a\u306f\u73fe\u5728\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u4ee5\u4e0b\u306e\u30d1\u30fc\u30c4\u3092\u8ffd\u52a0\u3057\u3066\uff0c\u3044\u308d\u3044\u308d\u306a\u8272\u3067\u5857\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0eA\u3068B\u306e\u4e21\u65b9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\u3069\u3053\u306b\u5165\u308c\u308b\u304b\u306f\uff0c\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<h1>A \u3000&lt;script type=&#8221;text\/javascript&#8221;&gt; \u301c\u3000&lt;\/script&gt;\u306e\u9593\u306b\u5165\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8<\/h1>\n<p>&nbsp;<\/p>\n<p>\uff08\uff11\uff09\u5909\u6570\u8a2d\u5b9a\u3092\u5897\u3084\u3059<\/p>\n<pre class=\"lang:default decode:true \">var myColor = \"rgb(255,0,0)\";\r\nvar myLine = 0;<\/pre>\n<p>\uff08\uff12\uff09\u3053\u306efunction\u3092\u3069\u3053\u304b\u306b<\/p>\n<pre class=\"lang:default decode:true \">function myWidth(myWidth){\r\nmyLine = myWidth;\r\n}<\/pre>\n<p>\uff08\uff13\uff09\u3053\u306efunction\u9054\u3092\u3069\u3053\u304b\u306b<\/p>\n<pre class=\"lang:js decode:true \">function myRed(){\r\nmyColor = \"rgb(255,0,0)\";\t\r\n}\r\nfunction myGreen(){\r\nmyColor = \"rgb(0,255,0)\";\t\r\n}\r\nfunction myBlu(){\r\nmyColor = \"rgb(0,0,255)\";\t\r\n}\r\nfunction myYel(){\r\nmyColor = \"rgb(255,255,0)\";\t\r\n}\r\nfunction myGray(){\r\nmyColor = \"rgb(128,128,128)\";\t\r\n}\r\nfunction myBlack(){\r\nmyColor = \"rgb(0,0,0)\";\t\r\n}<\/pre>\n<p>\uff08\uff14\uff09context.strokeStyle\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\uff08\u982d\u306b\/\/ \u3064\u3051\u3066\u7121\u52b9\u306b\u3059\u308b\uff09\u4ee3\u308f\u308a\u306b\u4e0b\u8a182\u884c\u76ee\u306e\u3092\u8ffd\u52a0\uff0e\u3053\u308c\u3067\u5909\u6570myColor\u306e\u8272\u306b\u5909\u66f4\u3067\u304d\u308b\uff08PC\u7528\u3068\u30b9\u30de\u30db\u7528\u3067\u306f\u51e6\u7406\u3057\u3066\u3044\u308bfunction\u304c\u9055\u3046\u306e\u306b\u6ce8\u610f\u3000\u3064\u307e\u308afunction draw()\u306e\u3068\u3053\u308d\u3060\u3051\u3067\u306a\u304f\uff0c\u30b9\u30de\u30db\u7528\u306e\u90e8\u5206\u3082\u5909\u66f4\u3057\u3088\u3046\uff09<\/p>\n<pre class=\"lang:default decode:true \">\/\/context.strokeStyle = \"rgba(255,0,0,1)\";\r\ncontext.strokeStyle = myColor<\/pre>\n<p>\uff08\uff15\uff09<\/p>\n<p>context.lineWidth\u3092\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u4e0b\u8a18\u306e2\u884c\u76ee\u3092\u8ffd\u52a0<\/p>\n<p>\uff08PC\u7528\u3068\u30b9\u30de\u30db\u7528\u3067\u306f\u51e6\u7406\u3057\u3066\u3044\u308bfunction\u304c\u9055\u3046\u306e\u306b\u6ce8\u610f\uff09<\/p>\n<pre class=\"lang:js decode:true \">\/\/context.lineWidth = 1;\/\/\u7dda\u306e\u592a\u3055\r\ncontext.lineWidth = myLine;<\/pre>\n<p>&nbsp;<\/p>\n<hr \/>\n<h1>\u00a0B\u3000&lt;\/script&gt;\u301c&lt;\/body&gt;\u306e\u9593\u306b\u5165\u308c\u308b\u30b9\u30af\u30ea\u30d7\u30c8<\/h1>\n<pre class=\"lang:xhtml decode:true \">&lt;form&gt;\r\n&lt;input type=\"button\" value=\"RED\" onclick=\"myRed()\"&gt;\r\n&lt;input type=\"button\" value=\"GREEEN\" onclick=\"myGreen()\"&gt;\r\n&lt;input type=\"button\" value=\"BLUE\" onclick=\"myBlu()\"&gt;\r\n&lt;input type=\"button\" value=\"YELLOW\" onclick=\"myYel()\"&gt;\r\n&lt;input type=\"button\" value=\"GRAY\" onClick=\"myGray()\"&gt;\r\n&lt;input type=\"button\" value=\"BLACK\" onClick=\"myBlack()\"&gt;\r\n&lt;\/form&gt;\r\n&lt;\/ br&gt;\r\n&lt;pre&gt;\r\n\u7dda\u306e\u592a\u3055&lt;input id=\"myRange\" value=\"1\" type=\"range\" max=\"10\" min=\"1\" step=\"0.1\" onChange=\"myWidth(this.value)\" \/&gt;\r\n&lt;\/pre&gt;\r\n&lt;hr&gt;<\/pre>\n<p>\u3053\u308c\u3067\u3046\u307e\u304f\u3044\u3051\u3070iPhone\u3067\u3082Android\u3067\u3082\u3069\u3061\u3089\u3067\u3082\u4f7f\u3048\u308b\u30b9\u30de\u30db\u7528\uff08PC\u3082\u52d5\u304f\u3068\u601d\u3044\u307e\u3059\uff09\u304a\u7d75\u304b\u304d\u30c4\u30fc\u30eb\u304c\u3067\u304d\u307e\u3059<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30bf\u30c3\u30c1\u304a\u7d75\u304b\u304d\u3082\u307e\u3082\u306a\u304f\u7d42\u4e86\u3067\u3059\uff0e \u307e\u305a\u306f\u73fe\u5728\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u306b\u4ee5\u4e0b\u306e\u30d1\u30fc\u30c4\u3092\u8ffd\u52a0\u3057\u3066\uff0c\u3044\u308d\u3044\u308d\u306a\u8272\u3067\u5857\u308c\u308b\u3088\u3046\u306b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0eA\u3068B\u306e\u4e21\u65b9\u3092\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\uff0e\u3069\u3053\u306b\u5165\u308c\u308b\u304b\u306f\uff0c\u8003\u3048\u3066\u307f\u307e\u3057\u3087\u3046\uff0e A \u3000&lt;scrip &hellip; <a href=\"https:\/\/nantoka.filmm.info\/blog\/?p=367\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">HTML5\u5165\u9580\u305d\u306e19-\u30bf\u30c3\u30c1\u3067\u304a\u7d75\u304b\u304d4<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,11,7],"tags":[],"class_list":["post-367","post","type-post","status-publish","format-standard","hentry","category-html5","category-javascript","category-7"],"_links":{"self":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=367"}],"version-history":[{"count":4,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/367\/revisions"}],"predecessor-version":[{"id":374,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=\/wp\/v2\/posts\/367\/revisions\/374"}],"wp:attachment":[{"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nantoka.filmm.info\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}