{"id":1139,"date":"2011-09-28T02:02:18","date_gmt":"2011-09-27T17:02:18","guid":{"rendered":"http:\/\/codaholic.org\/?p=1139"},"modified":"2011-09-28T02:08:55","modified_gmt":"2011-09-27T17:08:55","slug":"javascript%e5%90%84%e3%83%96%e3%83%a9%e3%82%a6%e3%82%b6%e3%81%a7%e3%83%9e%e3%82%a6%e3%82%b9%e3%83%9b%e3%82%a4%e3%83%bc%e3%83%ab%e3%81%ae%e6%93%8d%e4%bd%9c%e3%82%92%e6%a4%9c%e7%9f%a5%e3%81%99","status":"publish","type":"post","link":"https:\/\/codaholic.org\/?p=1139","title":{"rendered":"[Javascript]\u5404\u30d6\u30e9\u30a6\u30b6\u3067\u30de\u30a6\u30b9\u30db\u30a4\u30fc\u30eb\u306e\u64cd\u4f5c\u3092\u691c\u77e5\u3059\u308b"},"content":{"rendered":"<p>\u5404\u30d6\u30e9\u30a6\u30b6\u3067\u30de\u30a6\u30b9\u30db\u30a4\u30fc\u30eb\u64cd\u4f5c\u3092\u691c\u77e5\u3059\u308b\u65b9\u6cd5\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u306e\u3067\u8a18\u4e8b\u306b\u3057\u307e\u3059\u3002\u691c\u77e5\u3059\u308b\u65b9\u6cd5\u304c\u5404\u30d6\u30e9\u30a6\u30b6\u3067\u9055\u3046\u3088\u3046\u306a\u306e\u3067\u305d\u308c\u305e\u308c\u306e\u30d6\u30e9\u30a6\u30b6\u7528\u306b\u6761\u4ef6\u5206\u5c90\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4e0b\u8a18\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306fIE6\u3001IE7\u3001IE8\u3001Firefox\u3001Chrome\u3067\u52d5\u4f5c\u78ba\u8a8d\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><!--more--><\/p>\n<p class=\"subtitle\">\u30db\u30a4\u30fc\u30eb\u304c\u52d5\u304b\u3055\u308c\u305f\u3053\u3068\u3092\u691c\u77e5\u3059\u308b<\/p>\n<p>\u307e\u305a\u306f\u30de\u30a6\u30b9\u30db\u30a4\u30fc\u30eb\u304c\u52d5\u304b\u3055\u308c\u305f\u3089hello\u3068\u3044\u3046\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u8868\u793a\u3059\u308b\u3060\u3051\u306e\u5834\u5408\u3067\u3059\u3002<\/p>\n<p>Firefox\u306e\u5834\u5408\u306faddEventListener\u3068\u3044\u3046\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002\u305d\u306e\u95a2\u6570\u306e\u7b2c\u4e00\u5f15\u6570\u306b\u6587\u5b57\u5217\u300cDOMMouseScroll\u300d\u3092\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u691c\u77e5\u3057\u305f\u3068\u304d\u306b\u5b9f\u884c\u3059\u308b\u95a2\u6570\u3092\u3001\u7b2c\u4e09\u5f15\u6570\u306b\u306f\u3053\u3053\u3067\u306ffalse\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u7b2c\u4e09\u5f15\u6570\u306fuseCapture\u3092\u6709\u52b9\u306b\u3059\u308b\u304b\u3069\u3046\u304b\u3092\u6307\u5b9a\u3059\u308b\u306e\u3067\u3059\u304c\u3001\u3053\u306e\u7b2c\u4e09\u5f15\u6570\u306b\u3064\u3044\u3066\u306e\u8a73\u3057\u3044\u8aac\u660e\u306f\u4e0b\u8a18\u304c\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>JavaScript addEventListener() &#8211; \u3068\u307f\u305e\u30fc\u30ce\u30fc\u30c8<br \/>\n<a href=\"http:\/\/wiki.bit-hive.com\/tomizoo\/pg\/JavaScript%20addEventListener()\" target=\"_blank\">http:\/\/wiki.bit-hive.com\/tomizoo\/pg\/JavaScript%20addEventListener()<\/a><\/p>\n<p>IE\u306e\u5834\u5408\u306fattachEvent\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3044\u307e\u3059\u3002\u7b2c\u4e00\u5f15\u6570\u306b\u6587\u5b57\u5217\u300conmousewheel\u300d\u3092\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u691c\u77e5\u3057\u305f\u3068\u304d\u306b\u5b9f\u884c\u3059\u308b\u95a2\u6570\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>Chrome\u306e\u5834\u5408\u306fwindow\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306eonmousewheel\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30a4\u30d9\u30f3\u30c8\u3092\u691c\u77e5\u3057\u305f\u3068\u304d\u306b\u5b9f\u884c\u3059\u308b\u95a2\u6570\u3092\u767b\u9332\u3057\u307e\u3059\u3002<\/p>\n<p>[html]<br \/>\n<html><br \/>\n\t<head><br \/>\n\t\t<meta charset=\"UTF-8\" \/><br \/>\n\t\t<script type=\"text\/javascript\">\n\t\t\twindow.onload = function(){\n\t\t\t\t\/\/Firefox\n\t\t\t\tif(window.addEventListener){\n\t\t\t\t\twindow.addEventListener('DOMMouseScroll', function(){\n\t\t\t\t\t\talert('hello');\n\t\t\t\t\t}, false);\n\t\t\t\t}<\/p>\n<p>\t\t\t\t\/\/IE\n\t\t\t\tif(document.attachEvent){\n\t\t\t\t\tdocument.attachEvent('onmousewheel', function(){\n\t\t\t\t\t\talert('hello');\n\t\t\t\t\t});\n\t\t\t\t}<\/p>\n<p>\t\t\t\t\/\/Chrome\n\t\t\t\twindow.onmousewheel = function(){\n\t\t\t\t\talert('hello');\n\t\t\t\t}\n\t\t\t}\n\t\t<\/script><br \/>\n\t<\/head><br \/>\n\t<body><br \/>\n\t<\/body><br \/>\n<\/html><br \/>\n[\/html]<br \/>\n<\/p>\n<p class=\"subtitle\">\u30db\u30a4\u30fc\u30eb\u306e\u64cd\u4f5c\u91cf\u3092\u53d6\u5f97\u3059\u308b<\/p>\n<p>\u6b21\u306b\u3001\u30de\u30a6\u30b9\u30db\u30a4\u30fc\u30eb\u304c\u52d5\u304b\u3055\u308c\u305f\u91cf\u3092\u8868\u793a\u3059\u308b\u65b9\u6cd5\u3067\u3059\u3002\u30a4\u30d9\u30f3\u30c8\u3092\u691c\u77e5\u3057\u305f\u3068\u304d\u306b\u5b9f\u884c\u3059\u308b\u95a2\u6570\u306e\u5f15\u6570\u306be\u304c\u6e21\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u3053\u306ee\u306b\u306f\u30a4\u30d9\u30f3\u30c8\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u6e21\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3053\u3068\u3067\u3001\u30de\u30a6\u30b9\u30db\u30a4\u30fc\u30eb\u306e\u52d5\u304b\u3055\u308c\u305f\u91cf\u3092\u77e5\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Firefox\u3067\u306fe\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306edetail\u30d7\u30ed\u30d1\u30c6\u30a3\u306b\u3001IE\u3068Chrome\u3067\u306fwheelDelta\u30d7\u30ed\u30d1\u30c6\u30a3\u3067\u79fb\u52d5\u91cf\u3092\u53c2\u7167\u3067\u304d\u307e\u3059\u3002\u79c1\u306e\u74b0\u5883\u3067\u306fFirefox\u306f\u4e0a\u65b9\u5411\u306b\u52d5\u304b\u3059\u3068-6\u3001\u4e0b\u65b9\u5411\u306b\u52d5\u304b\u3059\u30686\u304c\u8868\u793a\u3055\u308c\u3001IE\u3068Chrome\u306f\u4e0a\u65b9\u5411\u306b\u52d5\u304b\u3059\u3068120\u3001\u4e0b\u65b9\u5411\u306b\u52d5\u304b\u3059\u3068-120\u304c\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002\u79fb\u52d5\u91cf\u306e\u6570\u5024\u304c\u30d6\u30e9\u30a6\u30b6\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u306e\u3067\u3001\u8a08\u7b97\u3067\u8abf\u6574\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>[html]<br \/>\n<html><br \/>\n\t<head><br \/>\n\t\t<meta charset=\"UTF-8\" \/><br \/>\n\t\t<script type=\"text\/javascript\">\n\t\t\twindow.onload = function(){\n\t\t\t\t\/\/Firefox\n\t\t\t\tif(window.addEventListener){\n\t\t\t\t\twindow.addEventListener('DOMMouseScroll', function(e){\n\t\t\t\t\t\talert(e.detail);\n\t\t\t\t\t}, false);\n\t\t\t\t}<\/p>\n<p>\t\t\t\t\/\/IE\n\t\t\t\tif(document.attachEvent){\n\t\t\t\t\tdocument.attachEvent('onmousewheel', function(e){\n\t\t\t\t\t\talert(e.wheelDelta);\n\t\t\t\t\t});\n\t\t\t\t}<\/p>\n<p>\t\t\t\t\/\/Chrome\n\t\t\t\twindow.onmousewheel = function(e){\n\t\t\t\t\talert(e.wheelDelta);\n\t\t\t\t}\n\t\t\t}\n\t\t<\/script><br \/>\n\t<\/head><br \/>\n\t<body><br \/>\n\t<\/body><br \/>\n<\/html><br \/>\n[\/html]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5404\u30d6\u30e9\u30a6\u30b6\u3067\u30de\u30a6\u30b9\u30db\u30a4\u30fc\u30eb\u64cd\u4f5c\u3092\u691c\u77e5\u3059\u308b\u65b9\u6cd5\u304c\u5206\u304b\u308a\u307e\u3057\u305f\u306e\u3067\u8a18\u4e8b\u306b\u3057\u307e\u3059\u3002\u691c\u77e5\u3059\u308b\u65b9\u6cd5\u304c\u5404\u30d6\u30e9\u30a6\u30b6\u3067\u9055\u3046\u3088\u3046\u306a\u306e\u3067\u305d\u308c\u305e\u308c\u306e\u30d6\u30e9\u30a6\u30b6\u7528\u306b\u6761\u4ef6\u5206\u5c90\u3092\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002\u4e0b\u8a18\u306e\u30b5\u30f3\u30d7\u30eb\u30b3\u30fc\u30c9\u306fIE6\u3001IE7\u3001IE8\u3001Fir [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[5],"tags":[245],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8gd1W-in","_links":{"self":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1139"}],"collection":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1139"}],"version-history":[{"count":15,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1139\/revisions"}],"predecessor-version":[{"id":1154,"href":"https:\/\/codaholic.org\/index.php?rest_route=\/wp\/v2\/posts\/1139\/revisions\/1154"}],"wp:attachment":[{"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1139"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1139"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codaholic.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1139"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}