{"id":3409,"date":"2023-06-24T15:34:36","date_gmt":"2023-06-24T06:34:36","guid":{"rendered":"https:\/\/attacktube.com\/?p=3409"},"modified":"2023-06-24T22:49:11","modified_gmt":"2023-06-24T13:49:11","slug":"%e3%80%90javascript%e3%80%91%e5%8f%b3%e3%82%af%e3%83%aa%e3%83%83%e3%82%af%e6%99%82%e3%81%ab%e3%82%ab%e3%82%b9%e3%82%bf%e3%83%a0%e3%81%97%e3%81%9f%e3%82%b3%e3%83%b3%e3%83%86%e3%82%ad%e3%82%b9%e3%83%88","status":"publish","type":"post","link":"https:\/\/attacktube.com\/?p=3409","title":{"rendered":"\u3010JavaScript\u3011\u53f3\u30af\u30ea\u30c3\u30af\u6642\u306b\u30ab\u30b9\u30bf\u30e0\u3057\u305f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\u8868\u793a(jquery.contextmenu.r2.js)"},"content":{"rendered":"\n<p>\u53f3\u30af\u30ea\u30c3\u30af\u6642\u306b\u30ab\u30b9\u30bf\u30e0\u3057\u305f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\u3092\u51fa\u3059\u3002<br>\u3053\u306ejquery.contextmenu.r2.js\u306f2007\u5e74\u306ejQuery\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3093\u3060\u306a\u3002<br>2023\u5e746\u670824\u65e5(\u571f)\u73fe\u5728\u3001\u79c1\u306f\u672a\u3060\u306b\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<br>\n<script async=\"\" src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-3461056110605997\" crossorigin=\"anonymous\"><\/script>\n<ins class=\"adsbygoogle\" style=\"display:block; text-align:center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-3461056110605997\" data-ad-slot=\"3137443461\"><\/ins>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script>\n<br>\n\n\n\n<p>\u6b21\u304b\u3089jquery.contextmenu.r2.js\u3092\u30c0\u30a6\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u3002<br><a href=\"https:\/\/ja.osdn.net\/frs\/g_redir.php?m=jaist&amp;f=icodeconsole%2Fconsole%2Fstatic%2Fjs%2Fjquery.contextmenu.r2.js\">https:\/\/ja.osdn.net\/frs\/g_redir.php?m=jaist&amp;f=icodeconsole%2Fconsole%2Fstatic%2Fjs%2Fjquery.contextmenu.r2.js<\/a> ExternalLink<br><br>\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9<br>jQuery\u3092\u4f7f\u3046\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<pre><code>\n&lt;!DOCTYPE html&gt;\n&lt;html lang=&quot;ja&quot;&gt;\n\n&lt;head&gt;\n\n  &lt;meta charset=&quot;utf-8&quot;&gt;\n  &lt;title&gt;\u53f3\u30af\u30ea\u30c3\u30af\u6642\u306b\u30ab\u30b9\u30bf\u30e0\u3057\u305f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\u8868\u793a&lt;\/title&gt;\n\n  &lt;style&gt;\n    body {\n      margin: 0;\n      padding: 0;\n    }\n\n    #idDemo1_red {\n      background-color: red;\n    }\n  &lt;\/style&gt;\n\n&lt;\/head&gt;\n\n&lt;body&gt;\n\n  &lt;h1&gt;\u53f3\u30af\u30ea\u30c3\u30af\u6642\u306b\u30ab\u30b9\u30bf\u30e0\u3057\u305f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\u8868\u793a&lt;\/h1&gt;\n\n  \u74b0\u5883&lt;br&gt;\n  jquery-3.6.3.min.js&lt;br&gt;\n  jquery.contextmenu.r2.js&lt;br&gt;\n\n  &lt;!-- \n  class\u540d\u304cdemo10\u306f\u4efb\u610f\u306e\u5024\n  \u3053\u306eclass\u540d\u304cdemo10\u306espan\u30bf\u30b0\u306e\u9818\u57df\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001\n  \u53f3\u30af\u30ea\u30c3\u30af\u6642\u306b\u30ab\u30b9\u30bf\u30e0\u3057\u305f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc(class\u540d\u304ccontextMenu\u3067id\u540d\u304cmyMenu10)\u3092\u8868\u793a\u3059\u308b\u3002--&gt;\n  &lt;span class=&quot;demo10&quot; id=&quot;idDemo1_red&quot;&gt;&lt;b&gt;\u30b3\u30b3\u3067\u53f3\u30af\u30ea\u30c3\u30af\u3059\u308b(\u8d64\u3044\u3068\u3053)&lt;\/b&gt;&lt;\/span&gt;\n\n  &lt;!-- \u3053\u306eclass\u540d\u306econtextMenu(\u5909\u66f4\u4e0d\u53ef)\u3002 \n  \u3082\u3057\u3001contextMenu\u3092\u5909\u66f4\u3059\u308b\u306b\u306fjquery.contextmenu.r2.js\u3092\u5909\u66f4\u3059\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002\n  myMenu10\u306f\u4efb\u610f\u306e\u5024 --&gt;\n  &lt;div class=&quot;contextMenu&quot; id=&quot;myMenu10&quot;&gt;\n\n    &lt;ul&gt;\n\n      &lt;li id=&quot;menu1&quot;&gt;menu1&lt;\/li&gt;\n\n\n      &lt;li id=&quot;menu2&quot;&gt;menu2&lt;\/li&gt;\n\n\n      &lt;li id=&quot;menu3&quot;&gt;menu3&lt;\/li&gt;\n\n\n      &lt;li id=&quot;menu4&quot;&gt;menu4&lt;\/li&gt;\n\n    &lt;\/ul&gt;\n\n\n  &lt;\/div&gt;\n\n  &lt;script src=&quot;js\/jquery-3.6.3.min.js&quot;&gt;&lt;\/script&gt;\n  &lt;script src=&quot;js\/jquery.contextmenu.r2.js&quot;&gt;&lt;\/script&gt;\n\n  &lt;script&gt;\n    $(function() {\n      $(&#039;span.demo10&#039;).contextMenu(&#039;myMenu10&#039;, {\n        \/\/\u9078\u629e\u3057\u305f\u30e1\u30cb\u30e5\u30fc\u306b\u3088\u3063\u3066\u30a2\u30e9\u30fc\u30c8\u3092\u51fa\u3057\u307e\u3059\u3002\n        bindings: {\n          &#039;menu1&#039;: function(t) {\n            alert(&#039;id\u306f&#039; + t.id + &#039;\u3067\u3059\u3002\\n menu1\u3002&#039;);\n          },\n          &#039;menu2&#039;: function(t) {\n            alert(&#039;id\u306f&#039; + t.id + &#039;\u3067\u3059\u3002\\n menu2\u3002&#039;);\n          },\n          &#039;menu3&#039;: function(t) {\n            alert(&#039;id\u306f&#039; + t.id + &#039;\u3067\u3059\u3002\\n menu3\u3002&#039;);\n          },\n          &#039;menu4&#039;: function(t) {\n            alert(&#039;id\u306f&#039; + t.id + &#039;\u3067\u3059\u3002\\n menu4\u3002&#039;);\n          }\n        }\n      });\n    });\n  &lt;\/script&gt;\n\n&lt;\/body&gt;\n\n&lt;\/html&gt;\n<\/code><\/pre>\n\n\n\n<p>\u53c2\u8003<br><a href=\"https:\/\/dad-union.com\/javascript\/123\">contextmenu.r2.js\u3092\u4f7f\u3063\u3066\u3001\u53f3\u30af\u30ea\u30c3\u30af\uff08\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\uff09\u30e1\u30cb\u30e5\u30fc\u3092\u30ab\u30b9\u30bf\u30e0\u3059\u308b\u65b9\u6cd5 DAD UNION &#8211; \u30a8\u30f3\u30b8\u30cb\u30a2\u540c\u76df (dad-union.com)<\/a> ExternalLink<\/p>\n\n\n\n<script type=\"text\/javascript\">\njQuery(function($){\n$(\".jp-video\").hide();\n});\n<\/script>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u53f3\u30af\u30ea\u30c3\u30af\u6642\u306b\u30ab\u30b9\u30bf\u30e0\u3057\u305f\u30b3\u30f3\u30c6\u30ad\u30b9\u30c8\u30e1\u30cb\u30e5\u30fc\u3092\u51fa\u3059\u3002\u3053\u306ejquery.contextmenu.r2.js\u306f2007\u5e74\u306ejQuery\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306a\u3093\u3060\u306a\u30022023\u5e746\u670824\u65e5(\u571f)\u73fe\u5728\u3001\u79c1\u306f\u672a\u3060\u306b\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u3044\u308b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3409","post","type-post","status-publish","format-standard","hentry","category-javascript"],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts\/3409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3409"}],"version-history":[{"count":5,"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts\/3409\/revisions"}],"predecessor-version":[{"id":3423,"href":"https:\/\/attacktube.com\/index.php?rest_route=\/wp\/v2\/posts\/3409\/revisions\/3423"}],"wp:attachment":[{"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/attacktube.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}