{"id":18465,"date":"2026-07-19T07:11:35","date_gmt":"2026-07-18T22:11:35","guid":{"rendered":"https:\/\/genai-ai.co.jp\/ai-kanri\/?p=18465"},"modified":"2026-07-19T07:11:35","modified_gmt":"2026-07-18T22:11:35","slug":"cc-html-onclick","status":"publish","type":"post","link":"https:\/\/genai-ai.co.jp\/ai-kanri\/blog\/cc-html-onclick\/","title":{"rendered":"\u30102026\u5e747\u6708\u6700\u65b0\u3011HTML\u306eonclick\u5c5e\u6027\u3067\u30af\u30ea\u30c3\u30af\u51e6\u7406\u3092\u3059\u308b\u5b8c\u5168\u30ac\u30a4\u30c9\uff5caddEventListener\u3068\u306e\u4f7f\u3044\u5206\u3051\u3068Claude Code\u6d3b\u7528"},"content":{"rendered":"\n<style>\n.g-flow-row{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;align-items:center;}\n.g-flow-item{background:linear-gradient(135deg,#1a1a1a,#2a1015);color:#fff;border-radius:8px;padding:16px 14px;min-width:130px;flex:1;text-align:center;}\n.g-flow-arrow{color:#dc2626;font-size:20px;font-weight:700;}\n.g-card-row{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 32px;}\n.g-card-row>div{flex:1;min-width:220px;}\n@media(max-width:600px){\n  .g-flow-row{flex-direction:column;}\n  .g-flow-arrow{transform:rotate(90deg);}\n  .g-card-row{flex-direction:column;}\n  .g-card-row>div{min-width:100%;}\n}\n<\/style>\n\n\n\n<div style=\"margin:0 0 32px;\">\n  <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/07\/thumb-cc-html-onclick.jpg\" alt=\"\u30102026\u5e747\u6708\u6700\u65b0\u3011HTML\u306eonclick\u5c5e\u6027\u3067\u30af\u30ea\u30c3\u30af\u51e6\u7406\u3092\u3059\u308b\u5b8c\u5168\u30ac\u30a4\u30c9\uff5caddEventListener\u3068\u306e\u4f7f\u3044\u5206\u3051\u3068Claude Code\u6d3b\u7528\" style=\"width:100%;height:auto;border-radius:12px;display:block;\">\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-radius:12px;padding:24px 28px;margin:0 0 32px;border-left:4px solid #0ea5e9;\">\n  <p style=\"font-size:15px;font-weight:700;color:#1a1a1a;margin:0 0 16px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9<\/p>\n  <ol style=\"margin:0;padding-left:20px;font-size:14px;line-height:2.2;list-style:none;\">\n    <li><a href=\"#sec-01\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">01<\/span>onclick\u5c5e\u6027\u306e\u57fa\u672c\u3068\u66f8\u304d\u65b9<\/a><\/li>\n    <li><a href=\"#sec-02\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">02<\/span>\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066onclick\u304b\u3089\u547c\u3073\u51fa\u3059<\/a><\/li>\n    <li><a href=\"#sec-03\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">03<\/span>this\u3067\u30af\u30ea\u30c3\u30af\u3057\u305f\u8981\u7d20\u81ea\u8eab\u3092\u53c2\u7167\u3059\u308b<\/a><\/li>\n    <li><a href=\"#sec-04\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">04<\/span>\u8907\u6570\u306e\u95a2\u6570\u3092onclick\u304b\u3089\u5b9f\u884c\u3059\u308b<\/a><\/li>\n    <li><a href=\"#sec-05\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">05<\/span>addEventListener\u3068\u306e\u4f7f\u3044\u5206\u3051<\/a><\/li>\n    <li><a href=\"#sec-06\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">06<\/span>\u30d5\u30a9\u30fc\u30e0\u306esubmit\u3068preventDefault\u306e\u7d44\u307f\u5408\u308f\u305b<\/a><\/li>\n    <li><a href=\"#sec-07\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">07<\/span>\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u3068\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<\/a><\/li>\n    <li><a href=\"#sec-08\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">08<\/span>Claude Code\u3067onclick\u51e6\u7406\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/a><\/li>\n    <li><a href=\"#faq\" style=\"color:#495057;text-decoration:none;\"><span style=\"color:#0ea5e9;font-weight:700;margin-right:8px;\">FAQ<\/span>\u3088\u304f\u3042\u308b\u8cea\u554f<\/a><\/li>\n  <\/ol>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\">Web\u30da\u30fc\u30b8\u306e\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u4f55\u304b\u304c\u8d77\u304d\u308b\u3002\u3053\u306e\u4ed5\u7d44\u307f\u3092\u4f5c\u308b\u306e\u304c<strong>onclick\u5c5e\u6027<\/strong>\u3067\u3059\u3002\u300c\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3089\u30a2\u30e9\u30fc\u30c8\u3092\u8868\u793a\u300d\u300c\u30af\u30ea\u30c3\u30af\u3067\u8981\u7d20\u306e\u8272\u3092\u5909\u3048\u308b\u300d\u300c\u30d5\u30a9\u30fc\u30e0\u3092\u9001\u4fe1\u3057\u305f\u3044\u304c\u5148\u306b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3057\u305f\u3044\u300d\u2014\u2014\u3053\u3046\u3057\u305f\u52d5\u4f5c\u306f\u3059\u3079\u3066onclick\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u8a18\u4e8b\u3067\u306fHTML\u306eonclick\u5c5e\u6027\u306e\u57fa\u672c\u66f8\u304d\u65b9\u304b\u3089\u3001\u95a2\u6570\u306e\u5b9a\u7fa9\u3068\u547c\u3073\u51fa\u3057\u3001this\u53c2\u7167\u3001addEventListener\u3068\u306e\u4f7f\u3044\u5206\u3051\u3001\u30d5\u30a9\u30fc\u30e0\u3068\u306e\u7d44\u307f\u5408\u308f\u305b\u3001Claude Code\u3092\u4f7f\u3063\u305f\u30b3\u30fc\u30c9\u81ea\u52d5\u751f\u6210\u307e\u3067\u5b9f\u4f8b\u30b3\u30fc\u30c9\u3068\u3068\u3082\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">onclick\u5c5e\u6027\u306fHTML\u30bf\u30b0\u306b\u76f4\u63a5\u66f8\u3051\u308b\u305f\u3081\u3001JavaScript\u306e\u5165\u9580\u3068\u3057\u3066\u6700\u521d\u306b\u899a\u3048\u308b\u4eba\u304c\u591a\u3044\u3067\u3059\u3002\u305f\u3060\u3057\u3001\u898f\u6a21\u304c\u5927\u304d\u304f\u306a\u308b\u306b\u3064\u308c\u3066addEventListener\u3078\u306e\u79fb\u884c\u3092\u691c\u8a0e\u3059\u308b\u7406\u7531\u3082\u7406\u89e3\u3057\u3066\u304a\u304f\u3053\u3068\u304c\u5927\u5207\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>onclick\u5c5e\u6027\u306e<strong>\u57fa\u672c\u69cb\u6587<\/strong>\u3068\u76f4\u63a5JavaScript\u3092\u66f8\u304f\u65b9\u6cd5<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066onclick\u304b\u3089\u547c\u3073\u51fa\u3059<\/strong>\u66f8\u304d\u65b9<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>this<\/strong>\u3067\u30af\u30ea\u30c3\u30af\u3057\u305f\u8981\u7d20\u81ea\u8eab\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u8907\u6570\u306e\u95a2\u6570<\/strong>\u3092onclick\u304b\u3089\u5b9f\u884c\u3059\u308b\u66f8\u304d\u65b9<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>onclick\u5c5e\u6027\u3068<strong>addEventListener<\/strong>\u306e\u4f7f\u3044\u5206\u3051\u3068\u9078\u629e\u57fa\u6e96<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>\u30d5\u30a9\u30fc\u30e0submit\u3067\u306e<strong>preventDefault<\/strong>\u306e\u6b63\u3057\u3044\u4f7f\u3044\u65b9<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>\u3088\u304f\u3042\u308b<strong>\u30a8\u30e9\u30fc\uff08\u95a2\u6570\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u30fb\u4e8c\u91cd\u5b9f\u884c\uff09<\/strong>\u306e\u539f\u56e0\u3068\u5bfe\u7b56<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>Claude Code<\/strong>\u3067onclick\u51e6\u7406\u30b3\u30fc\u30c9\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b\u65b9\u6cd5<\/span><\/div>\n\n<\/div>\n\n\n\n<div id=\"sec-01\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">01<\/span>\n  <span class=\"section-label\" style=\"display:block;\">BASIC<\/span>\n  <span class=\"section-title\" style=\"display:block;\">onclick\u5c5e\u6027\u306e\u57fa\u672c\u3068\u66f8\u304d\u65b9<\/span>\n  <span class=\"section-desc\">HTML\u30bf\u30b0\u306bonclick\u3092\u66f8\u3044\u3066JavaScript\u3092\u5b9f\u884c\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>onclick\u5c5e\u6027<\/strong>\uff1aHTML\u30bf\u30b0\u306b\u8a2d\u5b9a\u3059\u308b\u30a4\u30d9\u30f3\u30c8\u30cf\u30f3\u30c9\u30e9\u30fc\u5c5e\u6027\u3002\u30e6\u30fc\u30b6\u30fc\u304c\u305d\u306e\u8981\u7d20\u3092\u30af\u30ea\u30c3\u30af\uff08\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u96e2\u3059\uff09\u3057\u305f\u3068\u304d\u306b\u3001\u5c5e\u6027\u5024\u3068\u3057\u3066\u6307\u5b9a\u3057\u305fJavaScript\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3002button\u30fba\u30fbdiv\u30fbspan\u30fbimg\u306a\u3069\u307b\u307c\u3059\u3079\u3066\u306eHTML\u8981\u7d20\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u3002\u5024\u3068\u3057\u3066\u76f4\u63a5JavaScript\u306e\u5f0f\u3092\u66f8\u304f\u304b\u3001\u4e8b\u524d\u306b\u5b9a\u7fa9\u3057\u305f\u95a2\u6570\u540d\u3092\u66f8\u304f\u3002\u4f8b: onclick=\"alert('Hello')\" \u307e\u305f\u306f onclick=\"myFunction()\"\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\"><!-- \u57fa\u672c: onclick\u5c5e\u6027\u306bJavaScript\u3092\u76f4\u63a5\u66f8\u304f -->\n\n<!-- \u30b7\u30f3\u30d7\u30eb\u306a\u30a2\u30e9\u30fc\u30c8\u8868\u793a -->\n<button onclick=\"alert('\u30af\u30ea\u30c3\u30af\u3055\u308c\u307e\u3057\u305f\uff01')\">\u30af\u30ea\u30c3\u30af<\/button>\n\n<!-- \u5909\u6570\u3092\u4f7f\u3063\u305f\u51e6\u7406 -->\n<button onclick=\"let msg = 'Hello'; alert(msg);\">\u6328\u62f6<\/button>\n\n<!-- \u30bb\u30df\u30b3\u30ed\u30f3\u3067\u8907\u6570\u306e\u6587\u3092\u66f8\u304f\uff08\u975e\u63a8\u5968: \u9577\u3044\u3068\u8aad\u307f\u306b\u304f\u3044\uff09 -->\n<button onclick=\"console.log('\u30af\u30ea\u30c3\u30af'); document.title = 'clicked';\">\u8907\u6570\u51e6\u7406<\/button>\n\n<!-- a\u8981\u7d20\u306b\u4f7f\u3046\uff08href=\"#\" \u3067\u30da\u30fc\u30b8\u30c8\u30c3\u30d7\u306b\u30b9\u30af\u30ed\u30fc\u30eb\u3057\u306a\u3044\u3088\u3046\u306b\uff09 -->\n<a href=\"#\" onclick=\"alert('\u30ea\u30f3\u30af\u3092\u30af\u30ea\u30c3\u30af'); return false;\">\u30af\u30ea\u30c3\u30af\u30ea\u30f3\u30af<\/a>\n\n<!-- div\u3084span\u306b\u3082\u4f7f\u3048\u308b -->\n<div onclick=\"this.style.background = '#f0f0f0';\" style=\"padding:20px; border:1px solid #ccc; cursor:pointer;\">\n  \u3053\u306ediv\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u80cc\u666f\u8272\u304c\u5909\u308f\u308a\u307e\u3059\n<\/div><\/pre>\n<\/div>\n\n\n\n<div style=\"background:#f0fdf4;border:1px solid #22c55e;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#16a34a;font-size:15px;\">onclick\u5c5e\u6027\u5024\u306b\u306fJavaScript\u5f0f\u3092\u66f8\u304f<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">onclick\u5c5e\u6027\u306e\u5024\u306f\u6587\u5b57\u5217\u3067\u3059\u304c\u3001JavaScript\u3068\u3057\u3066\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002\u30af\u30a9\u30fc\u30c8\u306b\u306f\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3059\u3002onclick\u5c5e\u6027\u5024\u81ea\u4f53\u3092\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\uff08\"\uff09\u3067\u56f2\u3093\u3067\u3044\u308b\u5834\u5408\u3001JavaScript\u306e\u6587\u5b57\u5217\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\uff08''\uff09\u3092\u4f7f\u3044\u307e\u3059\u3002\u9006\u306b\u5c5e\u6027\u5024\u3092\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3067\u56f2\u3080\u5834\u5408\u306f\u5185\u90e8\u306b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u3092\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>\u30e6\u30fc\u30b6\u30fc\u304c\u30af\u30ea\u30c3\u30af<\/strong><br><span style=\"font-size:12px;\">\u30de\u30a6\u30b9\u30dc\u30bf\u30f3\u3092<br>\u62bc\u3057\u3066\u96e2\u3059<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u30d6\u30e9\u30a6\u30b6\u304conclick\u5c5e\u6027\u3092\u8aad\u3080<\/strong><br><span style=\"font-size:12px;\">\u5c5e\u6027\u5024\u3092JavaScript<br>\u3068\u3057\u3066\u5b9f\u884c<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>JavaScript\u30b3\u30fc\u30c9\u5b9f\u884c<\/strong><br><span style=\"font-size:12px;\">\u30a2\u30e9\u30fc\u30c8\u8868\u793a\u30fb<br>DOM\u5909\u66f4\u306a\u3069<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>\u753b\u9762\u304c\u66f4\u65b0\u3055\u308c\u308b<\/strong><br><span style=\"font-size:12px;\">\u30e6\u30fc\u30b6\u30fc\u306b<br>\u30d5\u30a3\u30fc\u30c9\u30d0\u30c3\u30af<\/span><\/div>\n<\/div>\n\n\n\n<div id=\"sec-02\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">02<\/span>\n  <span class=\"section-label\" style=\"display:block;\">FUNCTION<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066onclick\u304b\u3089\u547c\u3073\u51fa\u3059<\/span>\n  <span class=\"section-desc\">HTML\u3068JavaScript\u3092\u5206\u96e2\u3057\u3066\u7ba1\u7406\u3057\u3084\u3059\u3044\u30b3\u30fc\u30c9\u306b\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\"><!DOCTYPE html>\n<html lang=\"ja\">\n<head>\n  <meta charset=\"UTF-8\">\n  <title>onclick\u95a2\u6570\u547c\u3073\u51fa\u3057<\/title>\n<\/head>\n<body>\n\n  <!-- \u5f15\u6570\u306a\u3057 -->\n  <button onclick=\"showMessage()\">\u30e1\u30c3\u30bb\u30fc\u30b8\u8868\u793a<\/button>\n\n  <!-- \u5f15\u6570\u3042\u308a\uff08\u6587\u5b57\u5217\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\uff09 -->\n  <button onclick=\"greet('\u5c71\u7530\u592a\u90ce')\">\u6328\u62f6<\/button>\n\n  <!-- \u6570\u5024\u5f15\u6570 -->\n  <button onclick=\"calculate(10, 20)\">\u8a08\u7b97<\/button>\n\n  <script>\n    \/\/ \u5f15\u6570\u306a\u3057\u306e\u95a2\u6570\n    function showMessage() {\n      alert('\u3053\u3093\u306b\u3061\u306f\uff01onclick\u5c5e\u6027\u304b\u3089\u547c\u3073\u51fa\u3055\u308c\u307e\u3057\u305f\u3002');\n    }\n\n    \/\/ \u5f15\u6570\u3042\u308a\u306e\u95a2\u6570\n    function greet(name) {\n      alert('\u3053\u3093\u306b\u3061\u306f\u3001' + name + '\u3055\u3093\uff01');\n    }\n\n    \/\/ \u8907\u6570\u5f15\u6570\n    function calculate(a, b) {\n      const result = a + b;\n      alert(a + ' + ' + b + ' = ' + result);\n      console.log('\u8a08\u7b97\u7d50\u679c:', result);\n    }\n  <\/script>\n<\/body>\n<\/html><\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">onclick\u5c5e\u6027\u306b\u76f4\u63a5\u9577\u3044JavaScript\u3092\u66f8\u304f\u3068HTML\u304c\u8aad\u307f\u306b\u304f\u304f\u306a\u308a\u307e\u3059\u3002\u51e6\u7406\u304c2\u884c\u4ee5\u4e0a\u306b\u306a\u308b\u5834\u5408\u306f\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066onclick=\"functionName()\"\u3068\u547c\u3073\u51fa\u3059\u5f62\u306b\u5206\u96e2\u3059\u308b\u3068\u3001HTML\u306f\u30dc\u30bf\u30f3\u306e\u5b9a\u7fa9\u30fbJavaScript\u306f\u51e6\u7406\u30ed\u30b8\u30c3\u30af\u3068\u8cac\u52d9\u304c\u5206\u304b\u308c\u3066\u4fdd\u5b88\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u66f8\u304d\u65b9<\/th><th>\u30e1\u30ea\u30c3\u30c8<\/th><th>\u30c7\u30e1\u30ea\u30c3\u30c8<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>onclick=\"alert('Hello')\"<br>\uff08\u76f4\u63a5\u8a18\u8ff0\uff09<\/td><td>\u624b\u8efd\u30fb\u77ed\u3044\u30b3\u30fc\u30c9\u306b\u5411\u304f<\/td><td>HTML\u304c\u9577\u304f\u306a\u308b\u30fb\u518d\u5229\u7528\u4e0d\u53ef<\/td><\/tr>\n<tr><td>onclick=\"myFunc()\"<br>\uff08\u95a2\u6570\u547c\u3073\u51fa\u3057\uff09<\/td><td>\u518d\u5229\u7528\u53ef\u80fd\u30fbHTML\u3068JS\u3092\u5206\u96e2<\/td><td>\u95a2\u6570\u5b9a\u7fa9\u304c\u5fc5\u8981<\/td><\/tr>\n<tr><td>addEventListener<br>\uff08\u5f8c\u8ff0\uff09<\/td><td>HTML\u4e0d\u5909\u30fb\u8907\u6570\u30ea\u30b9\u30ca\u30fc\u53ef<\/td><td>JavaScript\u306e\u8a18\u8ff0\u91cf\u304c\u5897\u3048\u308b<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div id=\"sec-03\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">03<\/span>\n  <span class=\"section-label\" style=\"display:block;\">THIS<\/span>\n  <span class=\"section-title\" style=\"display:block;\">this\u3067\u30af\u30ea\u30c3\u30af\u3057\u305f\u8981\u7d20\u81ea\u8eab\u3092\u53c2\u7167\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u30dc\u30bf\u30f3\u306etext\u30fb\u5c5e\u6027\u30fb\u30b9\u30bf\u30a4\u30eb\u3092\u53d6\u5f97\u30fb\u5909\u66f4\u3059\u308b<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>this\u30ad\u30fc\u30ef\u30fc\u30c9\uff08onclick\u6587\u8108\uff09<\/strong>\uff1aonclick\u5c5e\u6027\u306e\u5024\uff08JavaScript\u30b3\u30fc\u30c9\uff09\u306e\u4e2d\u3067this\u3092\u4f7f\u3046\u3068\u3001\u305d\u306e\u5c5e\u6027\u304c\u8a2d\u5b9a\u3055\u308c\u305fHTML\u8981\u7d20\uff08\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u8981\u7d20\u81ea\u8eab\uff09\u3092\u53c2\u7167\u3067\u304d\u308b\u3002\u4f8b: onclick=\"this.style.color='red'\"\u3068\u3059\u308b\u3068\u3001\u30af\u30ea\u30c3\u30af\u3057\u305f\u8981\u7d20\u306e\u6587\u5b57\u8272\u304c\u8d64\u306b\u306a\u308b\u3002\u95a2\u6570\u306b\u6e21\u3059\u5834\u5408\u306fonclick=\"changeStyle(this)\"\u3068this\u3092\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059\u3002\u306a\u304a\u3001onclick\u5c5e\u6027\u304b\u3089\u95a2\u6570\u3092\u547c\u3073\u51fa\u3057\u305f\u5834\u5408\u306b\u95a2\u6570\u5185\u3067this\u3092\u4f7f\u3046\u3068\u7570\u306a\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u6307\u3059\u3053\u3068\u304c\u3042\u308b\u305f\u3081\u3001this\u53c2\u7167\u304c\u5fc5\u8981\u306a\u5834\u5408\u306f\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059\u306e\u304c\u78ba\u5b9f\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\"><!-- this\u3092\u4f7f\u3063\u305f\u8981\u7d20\u81ea\u8eab\u306e\u53c2\u7167 -->\n\n<!-- 1. \u30af\u30ea\u30c3\u30af\u3057\u305f\u8981\u7d20\u306e\u8272\u3092\u5909\u3048\u308b -->\n<button onclick=\"this.style.background = '#3b82f6'; this.style.color = '#fff';\">\n  \u8272\u3092\u5909\u3048\u308b\n<\/button>\n\n<!-- 2. \u30af\u30ea\u30c3\u30af\u3057\u305f\u8981\u7d20\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u5909\u3048\u308b -->\n<button onclick=\"this.textContent = '\u30af\u30ea\u30c3\u30af\u6e08\u307f\uff01'; this.disabled = true;\">\n  \u30af\u30ea\u30c3\u30af\n<\/button>\n\n<!-- 3. this\u3092\u5f15\u6570\u3068\u3057\u3066\u95a2\u6570\u306b\u6e21\u3059 -->\n<button onclick=\"toggleActive(this)\">\u30c8\u30b0\u30eb\u30dc\u30bf\u30f3<\/button>\n<button onclick=\"toggleActive(this)\">\u30c8\u30b0\u30eb\u30dc\u30bf\u30f32<\/button>\n\n<script>\n  \/\/ this\u3092\u5f15\u6570\u3068\u3057\u3066\u53d7\u3051\u53d6\u308b\u95a2\u6570\n  function toggleActive(element) {\n    \/\/ \u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u30dc\u30bf\u30f3\u81ea\u8eab\u3092\u64cd\u4f5c\n    if (element.classList.contains('active')) {\n      element.classList.remove('active');\n      element.textContent = 'OFF';\n      element.style.background = '';\n    } else {\n      element.classList.add('active');\n      element.textContent = 'ON';\n      element.style.background = '#22c55e';\n      element.style.color = '#fff';\n    }\n  }\n\n  \/\/ this\u3067\u89aa\u8981\u7d20\u3092\u64cd\u4f5c\u3059\u308b\u4f8b\n  function hideParent(element) {\n    element.parentElement.style.display = 'none';\n  }\n<\/script>\n\n<!-- 4. \u9589\u3058\u308b\u30dc\u30bf\u30f3: \u81ea\u5206\u306e\u89aa\u3092\u975e\u8868\u793a\u306b\u3059\u308b -->\n<div style=\"border:1px solid #ccc; padding:16px;\">\n  \u3053\u306e\u30ab\u30fc\u30c9\u3092\u9589\u3058\u308b\n  <button onclick=\"hideParent(this)\">\u00d7<\/button>\n<\/div><\/pre>\n<\/div>\n\n\n\n<div id=\"sec-04\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">04<\/span>\n  <span class=\"section-label\" style=\"display:block;\">MULTIPLE<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u8907\u6570\u306e\u95a2\u6570\u3092onclick\u304b\u3089\u5b9f\u884c\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u30bb\u30df\u30b3\u30ed\u30f3\u533a\u5207\u308a\u3068\u7d44\u307f\u5408\u308f\u305b\u95a2\u6570\u306e2\u30d1\u30bf\u30fc\u30f3<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\"><!-- \u65b9\u6cd51: \u30bb\u30df\u30b3\u30ed\u30f3\u3067\u533a\u5207\u3063\u3066\u8907\u6570\u51e6\u7406\uff08\u77ed\u3044\u51e6\u7406\u5411\u3051\uff09 -->\n<button onclick=\"console.log('\u30ed\u30b0\u51fa\u529b'); alert('\u5b8c\u4e86'); this.disabled = true;\">\n  3\u3064\u306e\u51e6\u7406\u3092\u5b9f\u884c\n<\/button>\n\n<!-- \u65b9\u6cd52: \u8907\u6570\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\uff08\u63a8\u5968\uff09 -->\n<button onclick=\"logClick(); showSuccess(); disableBtn(this);\">\n  3\u95a2\u6570\u3092\u5b9f\u884c\n<\/button>\n\n<!-- \u65b9\u6cd53: \u30e9\u30c3\u30d1\u30fc\u95a2\u6570\u3067\u307e\u3068\u3081\u308b\uff08\u6700\u3082\u7ba1\u7406\u3057\u3084\u3059\u3044\uff09 -->\n<button onclick=\"handleSubmitClick(this)\">\u9001\u4fe1<\/button>\n\n<script>\n  function logClick() {\n    console.log('\u30af\u30ea\u30c3\u30af\u767a\u751f:', new Date().toISOString());\n  }\n\n  function showSuccess() {\n    const msg = document.getElementById('successMsg');\n    if (msg) msg.style.display = 'block';\n  }\n\n  function disableBtn(btn) {\n    btn.disabled = true;\n    btn.textContent = '\u9001\u4fe1\u6e08\u307f';\n  }\n\n  \/\/ \u30e9\u30c3\u30d1\u30fc\u95a2\u6570: \u8907\u6570\u306e\u51e6\u7406\u30921\u304b\u6240\u3067\u307e\u3068\u3081\u308b\n  function handleSubmitClick(btn) {\n    logClick();\n    \/\/ \u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\n    const email = document.getElementById('email');\n    if (!email || email.value.trim() === '') {\n      alert('\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002');\n      return;\n    }\n    \/\/ \u6210\u529f\u51e6\u7406\n    showSuccess();\n    disableBtn(btn);\n  }\n<\/script><\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">onclick\u5c5e\u6027\u306b\u9577\u3044\u51e6\u7406\u3092\u30bb\u30df\u30b3\u30ed\u30f3\u3067\u4e26\u3079\u308b\u3088\u308a\u30011\u3064\u306e\u30e9\u30c3\u30d1\u30fc\u95a2\u6570\u306b\u307e\u3068\u3081\u3066onclick=\"handleXxx(this)\"\u3068\u547c\u3076\u307b\u3046\u304c\u65ad\u7136\u304a\u3059\u3059\u3081\u3067\u3059\u3002\u51e6\u7406\u306e\u8ffd\u52a0\u30fb\u524a\u9664\u30fb\u9806\u5e8f\u5909\u66f4\u304cJavaScript\u5074\u3060\u3051\u3067\u5b8c\u7d50\u3057\u3001HTML\u3092\u89e6\u3089\u305a\u306b\u6e08\u307f\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div id=\"sec-05\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">05<\/span>\n  <span class=\"section-label\" style=\"display:block;\">EVENT_LISTENER<\/span>\n  <span class=\"section-title\" style=\"display:block;\">addEventListener\u3068\u306e\u4f7f\u3044\u5206\u3051<\/span>\n  <span class=\"section-desc\">onclick\u5c5e\u6027\u3068addEventListener\u3092\u9078\u3076\u5224\u65ad\u57fa\u6e96<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>addEventListener<\/strong>\uff1aJavaScript\u3067HTML\u8981\u7d20\u306b\u30a4\u30d9\u30f3\u30c8\u30ea\u30b9\u30ca\u30fc\u3092\u767b\u9332\u3059\u308b\u30e1\u30bd\u30c3\u30c9\u3002element.addEventListener('click', \u95a2\u6570\u540d)\u306e\u3088\u3046\u306b\u3001\u7b2c1\u5f15\u6570\u306b\u30a4\u30d9\u30f3\u30c8\u540d\uff08'click'\uff09\u3001\u7b2c2\u5f15\u6570\u306b\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u3092\u6307\u5b9a\u3059\u308b\u3002\u540c\u4e00\u306e\u8981\u7d20\u306b\u540c\u3058\u30a4\u30d9\u30f3\u30c8\u3067\u8907\u6570\u306e\u30ea\u30b9\u30ca\u30fc\u3092\u767b\u9332\u3067\u304d\u308b\u70b9\u304conclick\u5c5e\u6027\u3068\u5927\u304d\u304f\u7570\u306a\u308b\u3002onClick\u5c5e\u6027\u306fHTML\u5074\u304b\u3089JS\u3092\u547c\u3076\u306e\u306b\u5bfe\u3057\u3001addEventListener\u306fJavaScript\u5074\u304b\u3089\u8981\u7d20\u3092\u53d6\u5f97\u3057\u3066\u30ea\u30b9\u30ca\u30fc\u3092\u8ffd\u52a0\u3059\u308b\uff08HTML\u5074\u3092\u5909\u66f4\u3057\u306a\u3044\uff09\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\"><!-- onclick\u5c5e\u6027 vs addEventListener \u306e\u6bd4\u8f03 -->\n\n<!-- onclick\u5c5e\u6027: HTML\u306b\u76f4\u63a5\u66f8\u304f -->\n<button id=\"btn1\" onclick=\"handleClick1()\">onclick\u5c5e\u6027<\/button>\n\n<!-- addEventListener: HTML\u306f\u30b7\u30f3\u30d7\u30eb\u3001JS\u3067\u767b\u9332 -->\n<button id=\"btn2\">addEventListener<\/button>\n\n<script>\n  \/\/ onclick\u5c5e\u6027\u7528\u306e\u95a2\u6570\n  function handleClick1() {\n    console.log('onclick\u5c5e\u6027\u304b\u3089\u5b9f\u884c');\n  }\n\n  \/\/ addEventListener\u3067\u767b\u9332\n  const btn2 = document.getElementById('btn2');\n  btn2.addEventListener('click', function() {\n    console.log('addEventListener\u304b\u3089\u5b9f\u884c');\n  });\n\n  \/\/ addEventListener\u306f\u540c\u3058\u8981\u7d20\u306b\u8907\u6570\u767b\u9332\u3067\u304d\u308b\n  btn2.addEventListener('click', function() {\n    console.log('2\u3064\u76ee\u306e\u30ea\u30b9\u30ca\u30fc');\n  });\n\n  \/\/ onclick\u5c5e\u6027\u306f1\u3064\u3057\u304b\u8a2d\u5b9a\u3067\u304d\u306a\u3044\uff08\u5f8c\u3067\u4e0a\u66f8\u304d\u3055\u308c\u308b\uff09\n  const btn1 = document.getElementById('btn1');\n  btn1.onclick = function() {\n    console.log('onclick\u5c5e\u6027\u3092JS\u3067\u8a2d\u5b9a'); \/\/ handleClick1\u304c\u4e0a\u66f8\u304d\u3055\u308c\u308b\uff01\n  };\n\n  \/\/ \u52d5\u7684\u306b\u751f\u6210\u3055\u308c\u305f\u8981\u7d20\u3078\u306e\u30a4\u30d9\u30f3\u30c8: \u89aa\u8981\u7d20\u3067\u59d4\u8b72\n  document.getElementById('list').addEventListener('click', function(event) {\n    if (event.target.tagName === 'LI') {\n      alert('\u30ea\u30b9\u30c8\u30a2\u30a4\u30c6\u30e0\u3092\u30af\u30ea\u30c3\u30af: ' + event.target.textContent);\n    }\n  });\n<\/script>\n\n<ul id=\"list\">\n  <li>\u30a2\u30a4\u30c6\u30e01<\/li>\n  <li>\u30a2\u30a4\u30c6\u30e02<\/li>\n<\/ul><\/pre>\n<\/div>\n\n\n\n<table>\n<thead><tr><th>\u6bd4\u8f03\u8ef8<\/th><th>onclick\u5c5e\u6027<\/th><th>addEventListener<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u8907\u6570\u30ea\u30b9\u30ca\u30fc<\/td><td>1\u3064\u306e\u307f\uff08\u5f8c\u66f8\u304d\u3067\u4e0a\u66f8\u304d\uff09<\/td><td>\u4f55\u500b\u3067\u3082\u8ffd\u52a0\u53ef\u80fd<\/td><\/tr>\n<tr><td>HTML\u304b\u3089\u306e\u5206\u96e2<\/td><td>HTML\u306bJS\u304c\u6df7\u5728\u3059\u308b<\/td><td>HTML\u3092\u5909\u66f4\u305b\u305aJS\u3060\u3051\u3067\u767b\u9332<\/td><\/tr>\n<tr><td>\u52d5\u7684\u751f\u6210\u8981\u7d20\u3078\u306e\u5bfe\u5fdc<\/td><td>\u76f4\u63a5\u8a2d\u5b9a\u304c\u5fc5\u8981<\/td><td>\u89aa\u8981\u7d20\u3078\u306e\u59d4\u8b72\u304c\u5bb9\u6613<\/td><\/tr>\n<tr><td>\u53d6\u308a\u5916\u3057\uff08removeEventListener\uff09<\/td><td>\u4e0d\u53ef\uff08\u4e0a\u66f8\u304d\u306e\u307f\uff09<\/td><td>\u53ef\u80fd\uff08\u30ea\u30b9\u30ca\u30fc\u95a2\u6570\u3092\u6e21\u3059\uff09<\/td><\/tr>\n<tr><td>\u9069\u3057\u305f\u7528\u9014<\/td><td>\u5c0f\u898f\u6a21\u30fb\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u30fb1\u51e6\u7406\u306e\u307f<\/td><td>\u4e2d\u301c\u5927\u898f\u6a21\u30fb\u8907\u6570\u30ea\u30b9\u30ca\u30fc\u30fb\u52d5\u7684<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div class=\"g-flow-row\" style=\"margin:24px 0;\">\n  <div class=\"g-flow-item\"><strong>onclick\u5c5e\u6027<\/strong><br><span style=\"font-size:12px;\">\u5c0f\u898f\u6a21\u30fb1\u51e6\u7406<br>HTML\u306b\u76f4\u66f8\u304d<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>onclick\u5c5e\u6027+\u95a2\u6570<\/strong><br><span style=\"font-size:12px;\">HTML\u3068JS\u3092\u5206\u96e2<br>\u518d\u5229\u7528\u6027\u5411\u4e0a<\/span><\/div>\n  <div class=\"g-flow-arrow\">&#8594;<\/div>\n  <div class=\"g-flow-item\"><strong>addEventListener<\/strong><br><span style=\"font-size:12px;\">\u4e2d\u301c\u5927\u898f\u6a21<br>\u8907\u6570\u30ea\u30b9\u30ca\u30fc\u5bfe\u5fdc<\/span><\/div>\n<\/div>\n\n\n\n<div id=\"sec-06\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">06<\/span>\n  <span class=\"section-label\" style=\"display:block;\">FORM<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u30d5\u30a9\u30fc\u30e0\u306esubmit\u3068preventDefault\u306e\u7d44\u307f\u5408\u308f\u305b<\/span>\n  <span class=\"section-desc\">\u30af\u30ea\u30c3\u30af\u3067\u30d5\u30a9\u30fc\u30e0\u9001\u4fe1\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u3066\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092\u884c\u3046<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>preventDefault()<\/strong>\uff1a\u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30e1\u30bd\u30c3\u30c9\u3002\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306a\u3069\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u52d5\u4f5c\uff08a\u30bf\u30b0\u306e\u30da\u30fc\u30b8\u9077\u79fb\u3001form\u306esubmit\u306a\u3069\uff09\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u3002onclick\u5c5e\u6027\u5185\u3067\u306f event.preventDefault() \u306e\u3088\u3046\u306b\u4f7f\u3046\u3002onclick\u5c5e\u6027\u306ereturn false; \u3082\u540c\u69d8\u306e\u52b9\u679c\u304c\u3042\u308b\u304c\u3001addEventListener\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u5834\u5408\u306fpreventDefault()\u3092\u4f7f\u3046\u306e\u304c\u6b63\u3057\u3044\u65b9\u6cd5\u3002\u30d5\u30a9\u30fc\u30e0\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\uff08\u9001\u4fe1\u524d\u306b\u30a8\u30e9\u30fc\u30c1\u30a7\u30c3\u30af\uff09\u3084\u78ba\u8a8d\u30c0\u30a4\u30a2\u30ed\u30b0\u306e\u5b9f\u88c5\u3067\u3088\u304f\u4f7f\u308f\u308c\u308b\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\"><!-- \u30d5\u30a9\u30fc\u30e0\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3: submit\u30dc\u30bf\u30f3\u306eonclick -->\n<form id=\"myForm\">\n  <label>\u540d\u524d: <input type=\"text\" id=\"nameInput\" placeholder=\"\u5c71\u7530\u592a\u90ce\"><\/label><br><br>\n  <label>\u30e1\u30fc\u30eb: <input type=\"email\" id=\"emailInput\" placeholder=\"example@example.com\"><\/label><br><br>\n  <button type=\"submit\" onclick=\"return validateForm()\">\u9001\u4fe1<\/button>\n<\/form>\n\n<div id=\"errors\" style=\"color:red; margin-top:8px;\"><\/div>\n\n<script>\n  function validateForm() {\n    const name = document.getElementById('nameInput').value.trim();\n    const email = document.getElementById('emailInput').value.trim();\n    const errors = [];\n\n    if (name === '') {\n      errors.push('\u540d\u524d\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002');\n    }\n    if (email === '') {\n      errors.push('\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002');\n    } else if (!email.includes('@')) {\n      errors.push('\u6b63\u3057\u3044\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u5f62\u5f0f\u3067\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044\u3002');\n    }\n\n    const errorDiv = document.getElementById('errors');\n    if (errors.length > 0) {\n      errorDiv.innerHTML = errors.join('<br>');\n      return false;  \/\/ submit\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\uff08\u30da\u30fc\u30b8\u304c\u9001\u4fe1\u3055\u308c\u306a\u3044\uff09\n    }\n\n    errorDiv.innerHTML = '';\n    return true;  \/\/ submit\u3092\u8a31\u53ef\uff08\u30d5\u30a9\u30fc\u30e0\u304c\u9001\u4fe1\u3055\u308c\u308b\uff09\n  }\n<\/script>\n\n<!-- a\u30bf\u30b0\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u52d5\u4f5c\u3092\u30ad\u30e3\u30f3\u30bb\u30eb -->\n<a href=\"https:\/\/example.com\" onclick=\"event.preventDefault(); showModal();\" target=\"_blank\" rel=\"noopener\">\n  \u78ba\u8a8d\u3057\u3066\u304b\u3089\u79fb\u52d5\n<\/a>\n\n<script>\n  function showModal() {\n    if (confirm('\u672c\u5f53\u306b\u79fb\u52d5\u3057\u307e\u3059\u304b\uff1f')) {\n      window.location.href = 'https:\/\/example.com';\n    }\n  }\n<\/script><\/pre>\n<\/div>\n\n\n\n<div style=\"background:#fef2f2;border:2px solid #dc2626;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:20px;\">&#9888;&#65039;<\/span>\n    <strong style=\"color:#dc2626;font-size:16px;\">return false \u3068 event.preventDefault() \u306e\u9055\u3044<\/strong>\n  <\/div>\n  <p style=\"margin:0;font-size:15px;line-height:1.8;color:#333;\">onclick\u5c5e\u6027\u3067return false;\u3092\u4f7f\u3046\u3068event.preventDefault()\u3068event.stopPropagation()\u306e\u4e21\u65b9\u304c\u5b9f\u884c\u3055\u308c\u307e\u3059\u3002a\u30bf\u30b0\u306e\u30da\u30fc\u30b8\u9077\u79fb\u3084\u30d5\u30a9\u30fc\u30e0submit\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u305f\u3044\u3060\u3051\u306a\u3089 return false; \u307e\u305f\u306f event.preventDefault(); \u306e\u3069\u3061\u3089\u3067\u3082\u52d5\u4f5c\u3057\u307e\u3059\u304c\u3001addEventListener\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u5834\u5408\u306f\u5fc5\u305aevent.preventDefault()\u3092\u4f7f\u3063\u3066\u304f\u3060\u3055\u3044\u3002return false; \u306faddEventListener\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u5185\u3067\u306f\u52b9\u679c\u304c\u3042\u308a\u307e\u305b\u3093\u3002<\/p>\n<\/div>\n\n\n\n<div id=\"sec-07\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">07<\/span>\n  <span class=\"section-label\" style=\"display:block;\">TROUBLESHOOT<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u3068\u30c8\u30e9\u30d6\u30eb\u30b7\u30e5\u30fc\u30c6\u30a3\u30f3\u30b0<\/span>\n  <span class=\"section-desc\">onclick\u5c5e\u6027\u304c\u52d5\u304b\u306a\u3044\u539f\u56e0\u30d1\u30bf\u30fc\u30f3\u3068\u5bfe\u51e6\u6cd5<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u30a4\u30d9\u30f3\u30c8\u30d0\u30d6\u30ea\u30f3\u30b0<\/strong>\uff1a\u30af\u30ea\u30c3\u30af\u30a4\u30d9\u30f3\u30c8\u306f\u767a\u751f\u3057\u305f\u8981\u7d20\u304b\u3089\u89aa\u8981\u7d20\u30fb\u7956\u5148\u8981\u7d20\u3078\u3068\u4f1d\u64ad\uff08\u30d0\u30d6\u30ea\u30f3\u30b0\uff09\u3057\u3066\u3044\u304f\u3002\u4f8b\u3048\u3070\u3001div\u5185\u306ebutton\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u3068\u3001button\u306eonclick\u304c\u5b9f\u884c\u3055\u308c\u305f\u5f8c\u306bdiv\u306eonclick\u3082\u5b9f\u884c\u3055\u308c\u308b\u3002\u3053\u308c\u304c\u610f\u56f3\u3057\u306a\u3044\u52d5\u4f5c\u306e\u539f\u56e0\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u3002\u4f1d\u64ad\u3092\u6b62\u3081\u308b\u306b\u306fevent.stopPropagation()\u3092\u4f7f\u3046\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#1e1e1e;border-radius:8px;padding:20px 24px;margin:20px 0;overflow-x:auto;\">\n  <pre style=\"margin:0;color:#d4d4d4;font-size:13px;line-height:1.8;font-family:'Consolas','Courier New',monospace;white-space:pre;\"><!-- \u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u30d1\u30bf\u30fc\u30f3\u3068\u5bfe\u51e6 -->\n\n<!-- \u30a8\u30e9\u30fc1: \u95a2\u6570\u304c\u5b9a\u7fa9\u3055\u308c\u308b\u524d\u306bHTML\u304c\u8aad\u307f\u8fbc\u307e\u308c\u308b -->\n<!-- \u554f\u984c: script\u30bf\u30b0\u304cbody\u3088\u308a\u524d\u306b\u3042\u308b\u3068\u95a2\u6570\u672a\u5b9a\u7fa9\u30a8\u30e9\u30fc\u306b\u306a\u308b\u5834\u5408\u304c\u3042\u308b -->\n<head>\n  <script>\n    \/* \u3053\u3053\u3067\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066\u3082HTML\u304c\u8aad\u307f\u8fbc\u307e\u308c\u305f\u5f8c\u306b\u53c2\u7167\u3067\u304d\u306a\u3044\u3053\u3068\u304c\u3042\u308b *\/\n    \/* \u5bfe\u7b56: script\u3092body\u306e\u6700\u5f8c\u306b\u7f6e\u304f\u304b\u3001DOMContentLoaded\u3092\u4f7f\u3046 *\/\n  <\/script>\n<\/head>\n\n<!-- \u5bfe\u7b561: script\u3092body\u306e\u672b\u5c3e\u306b\u7f6e\u304f\uff08\u63a8\u5968\uff09 -->\n<body>\n  <button onclick=\"myFunc()\">\u30af\u30ea\u30c3\u30af<\/button>\n  <!-- ... \u30b3\u30f3\u30c6\u30f3\u30c4 ... -->\n  <script>\n    function myFunc() { \/* ... *\/ }\n  <\/script>\n<\/body>\n\n<!-- \u30a8\u30e9\u30fc2: \u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u306e\u885d\u7a81 -->\n<!-- \u554f\u984c: onclick\u5185\u306e\u6587\u5b57\u5217\u306b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u3092\u4f7f\u3046\u3068HTML\u304c\u58ca\u308c\u308b -->\n<!-- \u8aa4: onclick=\"alert(\"Hello\")\"  \u2190 HTML\u30d1\u30fc\u30b5\u30fc\u304conclick=\"alert(\"\u3067\u7d42\u308f\u308a\u3068\u5224\u65ad -->\n<!-- \u6b63: onclick=\"alert('Hello')\"  \u2190 \u5185\u90e8\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3092\u4f7f\u3046 -->\n<button onclick=\"alert('\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u304c\u6b63\u89e3')\">\u78ba\u8a8d<\/button>\n\n<!-- \u30a8\u30e9\u30fc3: \u30d0\u30d6\u30ea\u30f3\u30b0\u306b\u3088\u308b\u4e8c\u91cd\u5b9f\u884c -->\n<div onclick=\"alert('div clicked')\">\n  <button onclick=\"alert('button clicked'); event.stopPropagation();\">\n    \u30dc\u30bf\u30f3\uff08\u4f1d\u64ad\u3092\u6b62\u3081\u308b\uff09\n  <\/button>\n<\/div>\n\n<script>\n  \/* \u30a8\u30e9\u30fc4: onclick\u306b\u5b58\u5728\u3057\u306a\u3044\u95a2\u6570\u540d\u3092\u6307\u5b9a *\/\n  \/* \u30b3\u30f3\u30bd\u30fc\u30eb\u3067Uncaught ReferenceError: xxx is not defined \u304c\u51fa\u305f\u3089\u95a2\u6570\u540d\u306e\u30bf\u30a4\u30dd\u304c\u539f\u56e0 *\/\n  \/* \u78ba\u8a8d\u65b9\u6cd5: \u30d6\u30e9\u30a6\u30b6\u306e\u30b3\u30f3\u30bd\u30fc\u30eb\uff08F12\uff09\u3092\u958b\u3044\u3066\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u898b\u308b *\/\n<\/script><\/pre>\n<\/div>\n\n\n\n<div class=\"balloon-wrap is-right\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/yamazaki-avatar.png\" alt=\"AI\u9b3c\u7ba1\u7406\u5c71\u5d0e\">\n    <span class=\"balloon-name\">AI\u9b3c\u7ba1\u7406\u5c71\u5d0e<\/span>\n  <\/div>\n  <div class=\"balloon-body\">\u300conclick\u5c5e\u6027\u3092\u8a2d\u5b9a\u3057\u305f\u306e\u306b\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082\u4f55\u3082\u8d77\u304d\u306a\u3044\u300d\u3068\u3044\u3046\u5834\u5408\u3001\u307e\u305a\u30d6\u30e9\u30a6\u30b6\u306eF12\u958b\u767a\u8005\u30c4\u30fc\u30eb\u2192Console\u30bf\u30d6\u3092\u958b\u3044\u3066\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300cReferenceError: xxx is not defined\u300d\u304c\u51fa\u3066\u3044\u308c\u3070\u95a2\u6570\u540d\u306e\u30bf\u30a4\u30dd\u3001\u300cSyntaxError\u300d\u304c\u51fa\u3066\u3044\u308c\u3070JS\u306e\u6587\u6cd5\u30a8\u30e9\u30fc\u3067\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div id=\"sec-08\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">08<\/span>\n  <span class=\"section-label\" style=\"display:block;\">AI_ASSIST<\/span>\n  <span class=\"section-title\" style=\"display:block;\">Claude Code\u3067onclick\u306eJavaScript\u51e6\u7406\u3092\u81ea\u52d5\u751f\u6210\u3059\u308b<\/span>\n  <span class=\"section-desc\">\u300c\u3053\u306e\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3089\u3007\u3007\u3059\u308b\u300d\u3068\u4f1d\u3048\u308b\u3060\u3051\u3067\u30b3\u30fc\u30c9\u304c\u5b8c\u6210<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff08Event Object\uff09<\/strong>\uff1aonclick\u5c5e\u6027\u3084addEventListener\u306e\u30b3\u30fc\u30eb\u30d0\u30c3\u30af\u95a2\u6570\u306b\u81ea\u52d5\u7684\u306b\u6e21\u3055\u308c\u308b\u5f15\u6570\u3002click\u30fbmousemove\u30fbkeydown\u306a\u3069\u306e\u30a4\u30d9\u30f3\u30c8\u60c5\u5831\u3092\u542b\u3080\u3002onclick\u5c5e\u6027\u306eJS\u30b3\u30fc\u30c9\u3067\u306fevent\u3068\u3044\u3046\u540d\u524d\u3067\u53c2\u7167\u3067\u304d\u308b\u3002\u4e3b\u306a\u30d7\u30ed\u30d1\u30c6\u30a3: event.target\uff08\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u8981\u7d20\uff09\u3001event.currentTarget\uff08\u30ea\u30b9\u30ca\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u8981\u7d20\uff09\u3001event.clientX\/clientY\uff08\u30af\u30ea\u30c3\u30af\u4f4d\u7f6e\u306e\u5ea7\u6a19\uff09\u3001event.shiftKey\uff08Shift\u30ad\u30fc\u304c\u62bc\u3055\u308c\u3066\u3044\u308b\u304b\uff09\u306a\u3069\u3002<\/p>\n<\/div>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Claude Code<\/strong>\u3092\u4f7f\u3048\u3070\u3001\u300c\u3053\u306e\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u3007\u3007\u3057\u3066\u307b\u3057\u3044\u300d\u3068\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308b\u3060\u3051\u3067\u3001onclick\u5c5e\u6027\u306e\u8a2d\u5b9a\u304b\u3089JavaScript\u95a2\u6570\u306e\u5b9a\u7fa9\u307e\u3067\u5b8c\u6210\u3057\u305fHTML\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<table>\n<thead><tr><th>\u3084\u308a\u305f\u3044\u3053\u3068<\/th><th>Claude Code\u3078\u306e\u6307\u793a\u4f8b<\/th><\/tr><\/thead>\n<tbody>\n<tr><td>\u30af\u30ea\u30c3\u30af\u3067\u30e1\u30c3\u30bb\u30fc\u30b8\u8868\u793a<\/td><td>\u300cHTML\u306ebutton\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u30a2\u30e9\u30fc\u30c8\u3067'\u9001\u4fe1\u5b8c\u4e86\uff01'\u3068\u8868\u793a\u3059\u308bonclick\u51e6\u7406\u3092\u66f8\u3044\u3066\u3002\u300d<\/td><\/tr>\n<tr><td>\u30c8\u30b0\u30eb\u30dc\u30bf\u30f3<\/td><td>\u300c\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3059\u308b\u305f\u3073\u306bON\/OFF\u306e\u72b6\u614b\u304c\u5207\u308a\u66ff\u308f\u308b\u30c8\u30b0\u30eb\u30dc\u30bf\u30f3\u3092HTML\u3068JavaScript\u3067\u4f5c\u3063\u3066\u3002\u300d<\/td><\/tr>\n<tr><td>\u30d5\u30a9\u30fc\u30e0\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3<\/td><td>\u300c\u540d\u524d\u30fb\u30e1\u30fc\u30eb\u306e\u30d5\u30a9\u30fc\u30e0\u3067\u3001\u9001\u4fe1\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3068\u304d\u672a\u5165\u529b\u306a\u3089\u30a8\u30e9\u30fc\u8868\u793a\u3001\u5165\u529b\u6e08\u307f\u306a\u3089\u9001\u4fe1\u3059\u308b\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u51e6\u7406\u3092onclick\u5c5e\u6027\u3067\u5b9f\u88c5\u3057\u3066\u3002\u300d<\/td><\/tr>\n<tr><td>\u8907\u6570\u30dc\u30bf\u30f3\u306e\u6392\u4ed6\u9078\u629e<\/td><td>\u300c\u8907\u6570\u306e\u30dc\u30bf\u30f3\u304c\u3042\u3063\u30661\u3064\u3060\u3051\u9078\u629e\u72b6\u614b\uff08\u80cc\u666f\u3092\u9752\uff09\u306b\u3059\u308b\u6392\u4ed6\u7684\u30cf\u30a4\u30e9\u30a4\u30c8\u51e6\u7406\u3092addEventListener\u3067\u66f8\u3044\u3066\u3002\u300d<\/td><\/tr>\n<\/tbody>\n<\/table>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">Claude Code\u306f\u300conclick\u5c5e\u6027\u3067\u3044\u3044\u304b\u3001addEventListener\u306e\u307b\u3046\u304c\u3088\u3044\u304b\u300d\u3068\u3044\u3046\u8a2d\u8a08\u306e\u76f8\u8ac7\u306b\u3082\u4e57\u3063\u3066\u304f\u308c\u307e\u3059\u3002\u300c\u3053\u306e\u30da\u30fc\u30b8\u306f\u30b7\u30f3\u30d7\u30eb\u306a\u306e\u3067\u76f4\u63a5\u66f8\u304d\u305f\u3044\u300d\u300c\u5c06\u6765\u7684\u306bJS\u30d5\u30a1\u30a4\u30eb\u306b\u5206\u96e2\u3057\u305f\u3044\u300d\u3068\u3044\u3046\u8981\u4ef6\u3092\u4f1d\u3048\u308c\u3070\u3001\u305d\u308c\u305e\u308c\u306e\u5b9f\u88c5\u65b9\u6cd5\u3092\u63d0\u6848\u3057\u3066\u304f\u308c\u307e\u3059\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:#fff8e1;border:1px solid #f59e0b;border-radius:8px;padding:20px 24px;margin:24px 0;\">\n  <div style=\"display:flex;align-items:center;gap:8px;margin-bottom:12px;\">\n    <span style=\"font-size:18px;\">&#128161;<\/span>\n    <strong style=\"color:#d97706;font-size:15px;\">\u5b9f\u8df5\u30d1\u30bf\u30fc\u30f3\uff1a\u30af\u30ea\u30c3\u30af\u5ea7\u6a19\u3068\u30ad\u30fc\u30dc\u30fc\u30c9\u4fee\u98fe\u30ad\u30fc\u306e\u53d6\u5f97<\/strong>\n  <\/div>\n  <p style=\"margin:0 0 12px;font-size:15px;line-height:1.8;color:#333;\">onclick\u306e\u30a4\u30d9\u30f3\u30c8\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f7f\u3046\u3068\u3001\u30af\u30ea\u30c3\u30af\u3057\u305f\u4f4d\u7f6e\u306e\u5ea7\u6a19\uff08clientX\/clientY\uff09\u3084Shift\u30ad\u30fc\u30fbCtrl\u30ad\u30fc\u304c\u62bc\u3055\u308c\u3066\u3044\u305f\u304b\uff08shiftKey\/ctrlKey\uff09\u3082\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002<\/p>\n<pre style=\"margin:8px 0 0;background:#1e1e1e;border-radius:6px;padding:14px 16px;color:#d4d4d4;font-size:13px;line-height:1.8;overflow-x:auto;\">&lt;div onclick=\"showClickInfo(event)\" style=\"width:300px;height:150px;border:2px dashed #ccc;cursor:crosshair;display:flex;align-items:center;justify-content:center;\"&gt;\n  \u30af\u30ea\u30c3\u30af\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\n&lt;\/div&gt;\n&lt;p id=\"info\" style=\"font-family:monospace;\"&gt;&lt;\/p&gt;\n\n&lt;script&gt;\n  function showClickInfo(event) {\n    const info = document.getElementById('info');\n    info.textContent =\n      'X: ' + event.clientX + ', Y: ' + event.clientY +\n      ' | Shift: ' + event.shiftKey +\n      ' | Ctrl: ' + event.ctrlKey;\n  }\n&lt;\/script&gt;<\/pre>\n  <p style=\"margin:12px 0 0;font-size:14px;color:#555;line-height:1.6;\">Shift\u30ad\u30fc\u3092\u62bc\u3057\u306a\u304c\u3089\u30af\u30ea\u30c3\u30af\uff08Shift+\u30af\u30ea\u30c3\u30af\uff09\u3067\u6319\u52d5\u3092\u5909\u3048\u305f\u3044\u5834\u5408\u306a\u3069\u306b\u4f7f\u3044\u307e\u3059\u3002event\u5f15\u6570\u306fonclick\u5c5e\u6027\u306eJS\u30b3\u30fc\u30c9\u3067\u81ea\u52d5\u7684\u306b\u53c2\u7167\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/div>\n\n\n\n<div style=\"background:#f8f9fa;border-left:4px solid #6b7280;border-radius:0 8px 8px 0;padding:16px 20px;margin:20px 0;\">\n  <p style=\"margin:0 0 4px;font-size:13px;font-weight:700;color:#6b7280;letter-spacing:1px;\">&#128218; \u7528\u8a9e\u89e3\u8aac<\/p>\n  <p style=\"margin:0;font-size:15px;line-height:1.7;\"><strong>\u30a4\u30d9\u30f3\u30c8\u59d4\u8b72\uff08Event Delegation\uff09<\/strong>\uff1a\u500b\u3005\u306e\u5b50\u8981\u7d20\u306bonclick\u3092\u8a2d\u5b9a\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u89aa\u8981\u7d201\u3064\u306baddEventListener\u3092\u8a2d\u5b9a\u3057\u3001event.target\u3067\u5b9f\u969b\u306b\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u5b50\u8981\u7d20\u3092\u5224\u5b9a\u3059\u308b\u8a2d\u8a08\u30d1\u30bf\u30fc\u30f3\u3002\u52d5\u7684\u306bli\u8981\u7d20\u304c\u8ffd\u52a0\u3055\u308c\u308b\u30ea\u30b9\u30c8\u306a\u3069\u3001\u8981\u7d20\u304c\u5f8c\u304b\u3089\u5897\u3048\u308b\u5834\u5408\u3067\u3082\u30ea\u30b9\u30ca\u30fc\u3092\u518d\u767b\u9332\u305b\u305a\u306b\u5bfe\u5fdc\u3067\u304d\u308b\u3002\u5927\u91cf\u306e\u8981\u7d20\u306b\u500b\u5225\u306bonclick\u3092\u8a2d\u5b9a\u3059\u308b\u3088\u308a\u30e1\u30e2\u30ea\u52b9\u7387\u3082\u826f\u3044\u3002<\/p>\n<\/div>\n\n\n\n<div id=\"sec-09\"><\/div>\n<h2 class=\"section-header-img\" style=\"margin:32px 0 24px;border-radius:8px;overflow:hidden;background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);padding:32px 28px;color:#fff;position:relative;border:none;border-left:none;text-align:left;\">\n  <span class=\"section-number\" style=\"display:block;\">09<\/span>\n  <span class=\"section-label\" style=\"display:block;\">CONCLUSION<\/span>\n  <span class=\"section-title\" style=\"display:block;\">\u307e\u3068\u3081\uff1aHTML\u306eonclick\u5c5e\u6027\u306e\u91cd\u8981\u30dd\u30a4\u30f3\u30c8<\/span>\n  <span class=\"section-desc\">\u57fa\u672c\u30fbthis\u53c2\u7167\u30fbaddEventListener\u4f7f\u3044\u5206\u3051\u306e\u30dd\u30a4\u30f3\u30c8\u6574\u7406<\/span>\n<\/h2>\n\n\n\n<div style=\"background:#fafafa;border-radius:8px;padding:16px 20px;margin:16px 0;border-left:4px solid #dc2626;\">\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>onclick\u5c5e\u6027\u306f<strong>\u307b\u307c\u3059\u3079\u3066\u306eHTML\u8981\u7d20<\/strong>\u306b\u8a2d\u5b9a\u3067\u304d\u3001\u30af\u30ea\u30c3\u30af\u6642\u306bJavaScript\u3092\u5b9f\u884c<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>onclick\u5c5e\u6027\u5024\u5185\u306eJavaScript\u306e<strong>\u6587\u5b57\u5217\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8<\/strong>\uff08\u5c5e\u6027\u5024\u306f\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u3067\u56f2\u3080\uff09<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u3066onclick=\"funcName()\"<\/strong>\u3067\u547c\u3073\u51fa\u3059\u3068HTML\u3068JS\u304c\u5206\u96e2\u3055\u308c\u3066\u7ba1\u7406\u3057\u3084\u3059\u3044<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>this\u3092\u5f15\u6570\u3068\u3057\u3066\u6e21\u3059<\/strong>\uff08onclick=\"func(this)\"\uff09\u3068\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u8981\u7d20\u81ea\u8eab\u3092\u95a2\u6570\u5185\u3067\u64cd\u4f5c\u3067\u304d\u308b<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span><strong>\u8907\u6570\u306e\u51e6\u7406\u306f\u30e9\u30c3\u30d1\u30fc\u95a2\u6570<\/strong>\u306b\u307e\u3068\u3081\u3066onclick=\"handleXxx()\"\u30681\u56de\u547c\u3073\u51fa\u3059\u306e\u304c\u4fdd\u5b88\u3057\u3084\u3059\u3044<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>addEventListener\u306f<strong>\u8907\u6570\u30ea\u30b9\u30ca\u30fc\u30fb\u52d5\u7684\u8981\u7d20\u30fbHTML\u3068JS\u306e\u5206\u96e2<\/strong>\u304c\u5fc5\u8981\u306a\u5834\u5408\u306b\u4f7f\u3046<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>\u30d5\u30a9\u30fc\u30e0\u9001\u4fe1\u30ad\u30e3\u30f3\u30bb\u30eb\u306f<strong>return false;<\/strong>\u307e\u305f\u306fevent.preventDefault()<\/span><\/div>\n<div style=\"display:flex;align-items:flex-start;gap:8px;padding:6px 0;font-size:15px;line-height:1.6;\"><span style=\"color:#dc2626;font-size:16px;flex-shrink:0;margin-top:2px;\">&#10004;&#65039;<\/span><span>\u52d5\u304b\u306a\u3044\u6642\u306f\u307e\u305a<strong>F12\u2192\u30b3\u30f3\u30bd\u30fc\u30eb<\/strong>\u3067\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b<\/span><\/div>\n\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Web\u30da\u30fc\u30b8\u306eJS\u51e6\u7406\u3092\u3082\u3063\u3068\u30b9\u30d4\u30fc\u30c9\u30a2\u30c3\u30d7\u3057\u305f\u3044\u65b9\u3078<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">onclick\u51e6\u7406\u306b\u9650\u3089\u305a\u3001Web\u30da\u30fc\u30b8\u306e\u30a4\u30f3\u30bf\u30e9\u30af\u30b7\u30e7\u30f3\u3084\u30d5\u30a9\u30fc\u30e0\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u3092Claude Code\u3067\u81ea\u52d5\u751f\u6210\u3059\u308b\u3068\u958b\u767a\u901f\u5ea6\u304c\u5927\u5e45\u306b\u5411\u4e0a\u3057\u307e\u3059\u3002<br>AI\u9b3c\u7ba1\u7406\u3067\u306f\u3001Web\u696d\u52d9\u306e\u81ea\u52d5\u5316\u30fb\u52b9\u7387\u5316\u306b\u3064\u3044\u3066\u306e\u7121\u6599\u76f8\u8ac7\u3092\u53d7\u3051\u4ed8\u3051\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"balloon-wrap\">\n  <div class=\"balloon-icon\">\n    <img decoding=\"async\" src=\"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-content\/uploads\/2026\/04\/ceo-sugasawa.jpg\" alt=\"\u4ee3\u8868\u83c5\u6fa4\">\n    <span class=\"balloon-name\">\u4ee3\u8868\u83c5\u6fa4<\/span>\n  <\/div>\n  <div class=\"balloon-body\">JavaScript\u51e6\u7406\u306e\u5b9f\u88c5\u3067\u300c\u66f8\u304d\u65b9\u304c\u308f\u304b\u3089\u306a\u3044\u300d\u300c\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u304c\u308f\u304b\u3089\u306a\u3044\u300d\u3068\u3044\u3046\u65b9\u3082\u3001Claude Code\u3078\u306e\u6307\u793a\u306e\u51fa\u3057\u65b9\u3092\u8eab\u306b\u3064\u3051\u308c\u3070\u81ea\u529b\u3067\u89e3\u6c7a\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305a\u304a\u6c17\u8efd\u306b\u3054\u76f8\u8ac7\u304f\u3060\u3055\u3044\u3002<\/div>\n<\/div>\n\n\n\n<div style=\"background:linear-gradient(135deg,#1a1a1a 0%,#2a1015 100%);border-radius:16px;padding:36px 32px;margin:48px 0 16px;color:#fff;\">\n  <p style=\"font-size:13px;font-weight:700;color:#dc2626;letter-spacing:2px;margin:0 0 12px;\">NEXT STEP<\/p>\n  <p style=\"font-size:22px;font-weight:800;line-height:1.5;margin:0 0 20px;\">\u3053\u306e\u8a18\u4e8b\u306e\u5185\u5bb9\u3092\u3001\u3042\u306a\u305f\u306e\u30d3\u30b8\u30cd\u30b9\u3067<br>\u5b9f\u8df5\u3057\u3066\u307f\u307e\u305b\u3093\u304b\uff1f<\/p>\n  <div style=\"background:rgba(255,255,255,0.06);border:1px solid rgba(255,255,255,0.12);border-radius:12px;padding:24px;max-width:560px;margin:0 auto;\">\n    <p style=\"font-size:13px;color:#dc2626;font-weight:700;margin:0 0 8px;\">AI\u6d3b\u7528\u3092\u81ea\u793e\u3067\u56de\u305b\u308b\u3088\u3046\u306b\u306a\u308a\u305f\u3044\u65b9\u3078<\/p>\n    <p style=\"font-size:20px;font-weight:800;margin:0 0 12px;\">AI\u9b3c\u7ba1\u7406<\/p>\n    <p style=\"font-size:14px;color:rgba(255,255,255,0.75);margin:0 0 20px;line-height:1.7;\">Claude Code\u30fbCowork\u5c0e\u5165\u652f\u63f4\u304b\u3089\u696d\u52d9\u8a2d\u8a08\u30fb\u793e\u5185\u6d78\u900f\u307e\u3067\u5b9f\u8df5\u30d9\u30fc\u30b9\u3067\u4f34\u8d70\u3002\u300c\u81ea\u793e\u3067\u56de\u305b\u308b\u7d44\u7e54\u300d\u309290\u65e5\u3067\u4f5c\u308b\u7d4c\u55b6\u8005\u5411\u3051\u30c8\u30ec\u30fc\u30cb\u30f3\u30b0\u3002<\/p>\n    <div style=\"text-align:center;\">\n      <a href=\"https:\/\/aikanri.genai-ai.co.jp\/?utm_source=blog&amp;utm_medium=article&amp;utm_campaign=cc-html-onclick&amp;utm_content=next-step-cta\" target=\"_blank\" rel=\"noopener\" style=\"display:inline-block;background:#dc2626;color:#fff;font-weight:700;font-size:15px;padding:14px 32px;border-radius:30px;text-decoration:none;\">AI\u9b3c\u7ba1\u7406\u3092\u8a73\u3057\u304f\u898b\u308b \u2192<\/a>\n    <\/div>\n  <\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">\u3088\u304f\u3042\u308b\u8cea\u554f<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Q. HTML\u306eonclick\u5c5e\u6027\u306e\u4f7f\u3044\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. onclick=\"\u5b9f\u884c\u3057\u305f\u3044JavaScript\"\u3068\u3044\u3046\u5f62\u3067HTML\u30bf\u30b0\u306b\u66f8\u304d\u307e\u3059\u3002\u4f8b: <button onclick=\"alert('Hello')\">\u30af\u30ea\u30c3\u30af<\/button>\u3002\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u5834\u5408\u306fonclick=\"functionName()\"\u3068\u66f8\u3044\u3066\u3001&lt;script&gt;\u30bf\u30b0\u5185\u3067\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002onclick\u5c5e\u6027\u306fbutton\u30fba\u30fbdiv\u30fbspan\u306a\u3069\u307b\u307c\u3059\u3079\u3066\u306eHTML\u8981\u7d20\u306b\u4f7f\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. onclick\u3067\u95a2\u6570\u306b\u5f15\u6570\u3092\u6e21\u3059\u65b9\u6cd5\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. onclick=\"functionName(\u5f15\u6570)\"\u306e\u3088\u3046\u306b\u95a2\u6570\u547c\u3073\u51fa\u3057\u306b\u5f15\u6570\u3092\u542b\u3081\u307e\u3059\u3002\u6587\u5b57\u5217\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3067\u56f2\u307f\u307e\u3059: onclick=\"greet('\u7530\u4e2d')\". \u6570\u5024\u306f\u305d\u306e\u307e\u307eonclick=\"calc(10, 20)\". \u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u8981\u7d20\u81ea\u8eab\u3092\u6e21\u3059\u5834\u5408\u306fonclick=\"func(this)\"\u3068this\u3092\u4f7f\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. onclick\u3068addEventListener\u306f\u3069\u3061\u3089\u3092\u4f7f\u3046\u3079\u304d\u3067\u3059\u304b\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u5c0f\u898f\u6a21\u306a\u51e6\u7406\u3084\u5b66\u7fd2\u76ee\u7684\u306a\u3089onclick\u5c5e\u6027\u304c\u624b\u8efd\u3067\u3059\u3002\u4e2d\u301c\u5927\u898f\u6a21\u306eWeb\u30a2\u30d7\u30ea\u3084\u3001\u540c\u4e00\u8981\u7d20\u306b\u8907\u6570\u306e\u30af\u30ea\u30c3\u30af\u30ea\u30b9\u30ca\u30fc\u304c\u5fc5\u8981\u306a\u5834\u5408\u3001HTML\u304b\u3089JavaScript\u3092\u5b8c\u5168\u306b\u5206\u96e2\u3057\u305f\u3044\u5834\u5408\u306faddEventListener\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u300cscript\u3092body\u306e\u672b\u5c3e\u306b\u7f6e\u3051\u3070DOM\u304c\u5148\u306b\u8aad\u307f\u8fbc\u307e\u308c\u308b\u306e\u3067addEventListener\u3067\u3082\u554f\u984c\u306a\u3044\u300d\u3068\u3044\u3046\u72b6\u6cc1\u304c\u591a\u3044\u305f\u3081\u3001\u898f\u6a21\u304c\u5927\u304d\u304f\u306a\u3063\u305f\u3089addEventListener\u3078\u306e\u79fb\u884c\u3092\u691c\u8a0e\u3059\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. onclick\u3067\u30d5\u30a9\u30fc\u30e0\u306esubmit\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. submit\u30dc\u30bf\u30f3\u306eonclick\u5c5e\u6027\u3067return false;\u3092\u4f7f\u3046\u65b9\u6cd5\u304c\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u3067\u3059: onclick=\"return validate()\". validate()\u95a2\u6570\u306e\u4e2d\u3067return false;\u3092\u8fd4\u3059\u3068\u30d5\u30a9\u30fc\u30e0\u9001\u4fe1\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u3001return true;\u3092\u8fd4\u3059\u3068\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002addEventListener\u3092\u4f7f\u3046\u5834\u5408\u306fevent.preventDefault()\u3067\u9001\u4fe1\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. onclick\u5c5e\u6027\u304c\u52d5\u304b\u306a\u3044\u30fb\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082\u4f55\u3082\u8d77\u304d\u306a\u3044\u539f\u56e0\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u4e3b\u306a\u539f\u56e0\u306f4\u3064\u3067\u3059\u3002\u2460\u95a2\u6570\u540d\u306e\u30bf\u30a4\u30dd\uff08\u30b9\u30da\u30eb\u30df\u30b9\uff09\u2014\u30b3\u30f3\u30bd\u30fc\u30eb\u306bReferenceError\u304c\u51fa\u308b \u2461\u6587\u5b57\u5217\u30af\u30a9\u30fc\u30c8\u306e\u885d\u7a81\u2014onclick=\"alert(\"text\")\"\u306e\u3088\u3046\u306b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u304c\u885d\u7a81\u3057\u3066\u3044\u308b \u2462script\u30bf\u30b0\u306e\u4f4d\u7f6e\u2014head\u306b\u66f8\u3044\u305f\u5834\u5408DOM\u3088\u308a\u5148\u306b\u5b9f\u884c\u3055\u308c\u3066\u8981\u7d20\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3053\u3068\u304c\u3042\u308b\uff08body\u306e\u672b\u5c3e\u306b\u7f6e\u304f\uff09 \u2463CSS\u306epointer-events: none\u2014\u30b9\u30bf\u30a4\u30eb\u3067\u30af\u30ea\u30c3\u30af\u304c\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u308b\u3002F12\u3092\u62bc\u3057\u3066\u30b3\u30f3\u30bd\u30fc\u30eb\u30bf\u30d6\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b\u306e\u304c\u6700\u77ed\u306e\u8a3a\u65ad\u65b9\u6cd5\u3067\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Q. Claude Code\u3067onclick\u306eJavaScript\u51e6\u7406\u3092\u4f5c\u3063\u3066\u3082\u3089\u3046\u306b\u306f\uff1f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A. \u300c\u3069\u306e\u8981\u7d20\u3092\u300d\u300c\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u300d\u300c\u4f55\u3092\u3059\u308b\u300d\u3092\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308b\u3060\u3051\u3067\u52d5\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u4f8b: \u300cHTML\u306e\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u3001div#message\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3057\u30663\u79d2\u5f8c\u306b\u6d88\u3048\u308b\u3088\u3046\u306b\u3059\u308bJavaScript\u3092onclick\u5c5e\u6027\u3067\u5b9f\u88c5\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300d\u3068\u3044\u3046\u5f62\u3067\u6307\u793a\u3059\u308b\u3068\u3001HTML\u30fbCSS\u30fbJavaScript\u304c\u30bb\u30c3\u30c8\u3067\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\n      \"@type\": \"Question\",\n      \"name\": \"HTML\u306eonclick\u5c5e\u6027\u306e\u4f7f\u3044\u65b9\u3092\u6559\u3048\u3066\u304f\u3060\u3055\u3044\u3002\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"onclick=\\\"\u5b9f\u884c\u3057\u305f\u3044JavaScript\\\"\u3068\u3044\u3046\u5f62\u3067HTML\u30bf\u30b0\u306b\u66f8\u304d\u307e\u3059\u3002\u4f8b: <button onclick=\\\"alert('Hello')\\\">\u30af\u30ea\u30c3\u30af<\/button>\u3002\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u5834\u5408\u306fonclick=\\\"functionName()\\\"\u3068\u66f8\u3044\u3066\u3001&lt;script&gt;\u30bf\u30b0\u5185\u3067\u95a2\u6570\u3092\u5b9a\u7fa9\u3057\u307e\u3059\u3002onclick\u5c5e\u6027\u306fbutton\u30fba\u30fbdiv\u30fbspan\u306a\u3069\u307b\u307c\u3059\u3079\u3066\u306eHTML\u8981\u7d20\u306b\u4f7f\u3048\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"onclick\u3067\u95a2\u6570\u306b\u5f15\u6570\u3092\u6e21\u3059\u65b9\u6cd5\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"onclick=\\\"functionName(\u5f15\u6570)\\\"\u306e\u3088\u3046\u306b\u95a2\u6570\u547c\u3073\u51fa\u3057\u306b\u5f15\u6570\u3092\u542b\u3081\u307e\u3059\u3002\u6587\u5b57\u5217\u306f\u30b7\u30f3\u30b0\u30eb\u30af\u30a9\u30fc\u30c8\u3067\u56f2\u307f\u307e\u3059: onclick=\\\"greet('\u7530\u4e2d')\\\". \u6570\u5024\u306f\u305d\u306e\u307e\u307eonclick=\\\"calc(10, 20)\\\". \u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u8981\u7d20\u81ea\u8eab\u3092\u6e21\u3059\u5834\u5408\u306fonclick=\\\"func(this)\\\"\u3068this\u3092\u4f7f\u3044\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"onclick\u3068addEventListener\u306f\u3069\u3061\u3089\u3092\u4f7f\u3046\u3079\u304d\u3067\u3059\u304b\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u5c0f\u898f\u6a21\u306a\u51e6\u7406\u3084\u5b66\u7fd2\u76ee\u7684\u306a\u3089onclick\u5c5e\u6027\u304c\u624b\u8efd\u3067\u3059\u3002\u4e2d\u301c\u5927\u898f\u6a21\u306eWeb\u30a2\u30d7\u30ea\u3084\u3001\u540c\u4e00\u8981\u7d20\u306b\u8907\u6570\u306e\u30af\u30ea\u30c3\u30af\u30ea\u30b9\u30ca\u30fc\u304c\u5fc5\u8981\u306a\u5834\u5408\u3001HTML\u304b\u3089JavaScript\u3092\u5b8c\u5168\u306b\u5206\u96e2\u3057\u305f\u3044\u5834\u5408\u306faddEventListener\u304c\u9069\u3057\u3066\u3044\u307e\u3059\u3002\u300cscript\u3092body\u306e\u672b\u5c3e\u306b\u7f6e\u3051\u3070DOM\u304c\u5148\u306b\u8aad\u307f\u8fbc\u307e\u308c\u308b\u306e\u3067addEventListener\u3067\u3082\u554f\u984c\u306a\u3044\u300d\u3068\u3044\u3046\u72b6\u6cc1\u304c\u591a\u3044\u305f\u3081\u3001\u898f\u6a21\u304c\u5927\u304d\u304f\u306a\u3063\u305f\u3089addEventListener\u3078\u306e\u79fb\u884c\u3092\u691c\u8a0e\u3059\u308b\u3068\u3088\u3044\u3067\u3057\u3087\u3046\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"onclick\u3067\u30d5\u30a9\u30fc\u30e0\u306esubmit\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3059\u308b\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"submit\u30dc\u30bf\u30f3\u306eonclick\u5c5e\u6027\u3067return false;\u3092\u4f7f\u3046\u65b9\u6cd5\u304c\u6700\u3082\u30b7\u30f3\u30d7\u30eb\u3067\u3059: onclick=\\\"return validate()\\\". validate()\u95a2\u6570\u306e\u4e2d\u3067return false;\u3092\u8fd4\u3059\u3068\u30d5\u30a9\u30fc\u30e0\u9001\u4fe1\u304c\u30ad\u30e3\u30f3\u30bb\u30eb\u3055\u308c\u3001return true;\u3092\u8fd4\u3059\u3068\u9001\u4fe1\u3055\u308c\u307e\u3059\u3002addEventListener\u3092\u4f7f\u3046\u5834\u5408\u306fevent.preventDefault()\u3067\u9001\u4fe1\u3092\u30ad\u30e3\u30f3\u30bb\u30eb\u3057\u307e\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"onclick\u5c5e\u6027\u304c\u52d5\u304b\u306a\u3044\u30fb\u30af\u30ea\u30c3\u30af\u3057\u3066\u3082\u4f55\u3082\u8d77\u304d\u306a\u3044\u539f\u56e0\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u4e3b\u306a\u539f\u56e0\u306f4\u3064\u3067\u3059\u3002\u2460\u95a2\u6570\u540d\u306e\u30bf\u30a4\u30dd\uff08\u30b9\u30da\u30eb\u30df\u30b9\uff09\u2014\u30b3\u30f3\u30bd\u30fc\u30eb\u306bReferenceError\u304c\u51fa\u308b \u2461\u6587\u5b57\u5217\u30af\u30a9\u30fc\u30c8\u306e\u885d\u7a81\u2014onclick=\\\"alert(\\\"text\\\")\\\"\u306e\u3088\u3046\u306b\u30c0\u30d6\u30eb\u30af\u30a9\u30fc\u30c8\u304c\u885d\u7a81\u3057\u3066\u3044\u308b \u2462script\u30bf\u30b0\u306e\u4f4d\u7f6e\u2014head\u306b\u66f8\u3044\u305f\u5834\u5408DOM\u3088\u308a\u5148\u306b\u5b9f\u884c\u3055\u308c\u3066\u8981\u7d20\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3053\u3068\u304c\u3042\u308b\uff08body\u306e\u672b\u5c3e\u306b\u7f6e\u304f\uff09 \u2463CSS\u306epointer-events: none\u2014\u30b9\u30bf\u30a4\u30eb\u3067\u30af\u30ea\u30c3\u30af\u304c\u7121\u52b9\u5316\u3055\u308c\u3066\u3044\u308b\u3002F12\u3092\u62bc\u3057\u3066\u30b3\u30f3\u30bd\u30fc\u30eb\u30bf\u30d6\u306e\u30a8\u30e9\u30fc\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u78ba\u8a8d\u3059\u308b\u306e\u304c\u6700\u77ed\u306e\u8a3a\u65ad\u65b9\u6cd5\u3067\u3059\u3002\"\n      }\n    },\n    {\n      \"@type\": \"Question\",\n      \"name\": \"Claude Code\u3067onclick\u306eJavaScript\u51e6\u7406\u3092\u4f5c\u3063\u3066\u3082\u3089\u3046\u306b\u306f\uff1f\",\n      \"acceptedAnswer\": {\n        \"@type\": \"Answer\",\n        \"text\": \"\u300c\u3069\u306e\u8981\u7d20\u3092\u300d\u300c\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u300d\u300c\u4f55\u3092\u3059\u308b\u300d\u3092\u65e5\u672c\u8a9e\u3067\u4f1d\u3048\u308b\u3060\u3051\u3067\u52d5\u4f5c\u3059\u308b\u30b3\u30fc\u30c9\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002\u4f8b: \u300cHTML\u306e\u30dc\u30bf\u30f3\u3092\u30af\u30ea\u30c3\u30af\u3057\u305f\u3089\u3001div#message\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u8868\u793a\u3057\u30663\u79d2\u5f8c\u306b\u6d88\u3048\u308b\u3088\u3046\u306b\u3059\u308bJavaScript\u3092onclick\u5c5e\u6027\u3067\u5b9f\u88c5\u3057\u3066\u304f\u3060\u3055\u3044\u3002\u300d\u3068\u3044\u3046\u5f62\u3067\u6307\u793a\u3059\u308b\u3068\u3001HTML\u30fbCSS\u30fbJavaScript\u304c\u30bb\u30c3\u30c8\u3067\u8fd4\u3063\u3066\u304d\u307e\u3059\u3002\"\n      }\n    }\n  ]\n}\n<\/script>\n\n\n","protected":false},"excerpt":{"rendered":"<p>HTML\u306eonclick\u5c5e\u6027\u3092\u5b8c\u5168\u89e3\u8aac\u3002\u30af\u30ea\u30c3\u30af\u6642\u306b\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u57fa\u672c\u304b\u3089\u3001\u30a4\u30f3\u30e9\u30a4\u30f3\u8a18\u8ff0\u306e\u554f\u984c\u70b9\u3001addEventListener\u3068\u306e\u4f7f\u3044\u5206\u3051\u3001this\u3067\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3001\u8907\u6570\u95a2\u6570\u306e\u5b9f\u884c\u3001\u30d5\u30a9\u30fc\u30e0\u306esubmit\u3068preventDefault\u3001Claude Code\u3067\u306e\u30b3\u30fc\u30c9\u81ea\u52d5\u751f\u6210\u307e\u3067\u5b9f\u4f8b\u4ed8\u304d\u3067\u89e3\u8aac\u3002<\/p>\n","protected":false},"author":1,"featured_media":18464,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sitemap_hide":"","_veu_custom_css":"","vkexunit_cta_each_option":"","footnotes":"","rank_math_description":"HTML\u306eonclick\u5c5e\u6027\u3092\u5b8c\u5168\u89e3\u8aac\u3002\u30af\u30ea\u30c3\u30af\u6642\u306b\u95a2\u6570\u3092\u547c\u3073\u51fa\u3059\u57fa\u672c\u304b\u3089\u3001\u30a4\u30f3\u30e9\u30a4\u30f3\u8a18\u8ff0\u306e\u554f\u984c\u70b9\u3001addEventListener\u3068\u306e\u4f7f\u3044\u5206\u3051\u3001this\u3067\u30af\u30ea\u30c3\u30af\u3055\u308c\u305f\u8981\u7d20\u3092\u53d6\u5f97\u3059\u308b\u65b9\u6cd5\u3001\u8907\u6570\u95a2\u6570\u306e\u5b9f\u884c\u3001\u30d5\u30a9\u30fc\u30e0\u306esubmit\u3068preventDefault\u3001Claude Code\u3067\u306e\u30b3\u30fc\u30c9\u81ea\u52d5\u751f\u6210\u307e\u3067\u5b9f\u4f8b\u4ed8\u304d\u3067\u89e3\u8aac\u3002","rank_math_focus_keyword":"HTML onclick \u5c5e\u6027 \u30af\u30ea\u30c3\u30af \u51e6\u7406","rank_math_title":"\u30102026\u5e747\u6708\u6700\u65b0\u3011HTML\u306eonclick\u5c5e\u6027\u3067\u30af\u30ea\u30c3\u30af\u51e6\u7406\u3092\u3059\u308b\u5b8c\u5168\u30ac\u30a4\u30c9\uff5caddEventListener\u3068\u306e\u4f7f\uff5cAI\u9b3c\u7ba1\u7406","pending_rewrite_html":"","pending_rewrite_id":"","pending_rewrite_kw":"","pending_rewrite_at":"","pending_rewrite_source":"","pending_rewrite_brief":"","pending_rewrite_evidence":"","approved_rewrite_html":"","approved_rewrite_id":"","approved_rewrite_kw":"","approved_rewrite_at":"","approved_rewrite_by":"","approved_rewrite_brief":"","approved_rewrite_evidence":"","rewrite_tracker_baseline":"","rewrite_tracker_7day":"","rewrite_tracker_14day":"","rewrite_tracker_30day":"","rewrite_tracker_notified":""},"categories":[3,2],"tags":[],"class_list":["post-18465","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai-automation","category-claude-tips"],"_links":{"self":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18465","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/comments?post=18465"}],"version-history":[{"count":2,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18465\/revisions"}],"predecessor-version":[{"id":18467,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/posts\/18465\/revisions\/18467"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media\/18464"}],"wp:attachment":[{"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/media?parent=18465"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/categories?post=18465"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/genai-ai.co.jp\/ai-kanri\/wp-json\/wp\/v2\/tags?post=18465"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}