{"id":1484,"date":"2006-10-10T20:01:36","date_gmt":"2006-10-10T12:01:36","guid":{"rendered":"http:\/\/ihower.idv.tw\/blog\/archives\/1484"},"modified":"2008-05-27T20:23:26","modified_gmt":"2008-05-27T12:23:26","slug":"dom-scripting","status":"publish","type":"post","link":"https:\/\/ihower.tw\/blog\/1484-dom-scripting","title":{"rendered":"DOM Scripting"},"content":{"rendered":"<p>Update(2008\/5\/27): \u624b\u4e0a\u591a\u4e86\u672c\u5168\u65b0\u7684 DOM Scripting \u66f8\uff0c\u6b32\u552e $1000\uff0c\u8acb\u53c3\u8003<a href=\"http:\/\/tw.f3.page.bid.yahoo.com\/tw\/auction\/c36577379\">Y! \u62cd\u8ce3<\/a> or \u76f4\u63a5\u806f\u7d61\u6211\u3002<\/p>\n<p><a href=\"http:\/\/domscripting.com\/book\/\"><img decoding=\"async\" src=\"http:\/\/www.friendsofed.com\/img\/cover\/1590595335.jpg\" style=\"float: left; margin: 5px; border: 0px; padding: 5px\" \/><\/a>\u60f3\u597d\u597d\u5b78 Javascript \u60f3\u597d\u4e45\u4e86\uff0c\u8a18\u5f97\u5f88\u65e9\u524d\u662f\u5538\u904e <a href=\"http:\/\/www.oreilly.com.tw\/product_web.php?id=a101\">Javascript \u8a2d\u8a08\u98a8\u683c<\/a>\uff0c\u56de\u60f3\u8d77\u4f86\u597d\u50cf\u662f\u5b8c\u5168\u4e0d\u540c\u5e74\u4ee3\uff0c\u73fe\u4ee3\u7684 Javascript \u8981 unobtrusive \uff0c\u8ddf css \u4e00\u6a23\u80fd\u5920\u8ddf markup \u5206\u96e2\u51fa\u4f86\u3002\u524d\u4e9b\u65e5\u5b50\u6709\u5ff5\u4e00\u4e0b <a href=\"http:\/\/tlsj.tenlong.com.tw\/WebModule\/BookSearch\/bookSearchViewAction.do?isbn=9867199243&amp;sid=28172\">DHTML Utopia<\/a>\uff0c\u53ef\u662f\u90a3\u672ccode\u597d\u4e82\uff0c\u96dc\u96dc\u7684\u4e26\u4e0d\u662f\u5f88\u597d\u5ff5\uff0c\u6240\u4ee5\u5ff5\u4e86\u5e7e\u7ae0\u5c31\u505c\u4f4f\u4e86\u3002<\/p>\n<p>\u5728\u6d88\u5316\u773e\u591a Ajax \u66f8\u7c4d\u4e4b\u524d\uff0c\u6211\u53e6\u9078\u4e86\u9019\u672c\u91cd\u65b0\u9032\u5165 Javascript \u7684\u4e16\u754c\uff0c\u66f8\u7684\u524d\u8a00\u662f\u8aaa\u5beb\u7d66 web designer \u800c\u4e0d\u9650\u65bc programming \u51fa\u8eab\uff0c\u6240\u4ee5\u6574\u672c\u66f8\u591a\u82b1\u4e86\u4e9b\u7bc7\u5e45\u5728\u8b1b\u5f88\u57fa\u672c\u7684 programming \u7684\u5730\u65b9\uff0c\u50cf\u662f if \u5566 while \u5566\u3001\u63d0\u9192\u4f60 = \u8ddf == \u7684\u4e0d\u540c\u7b49\uff0c\u9084\u6709\u91cd\u8907\u524d\u6587\u7684code\u5f88\u591a(\u6015\u4f60\u5fd8\u8a18\u627e\u4e0d\u5230?)\u3002\u9664\u4e86\u9019\u500b\u6709\u9ede\u56c9\u5506\u7684\u7f3a\u9ede\uff0c\u9019\u672c\u66f8\u7684\u7ae0\u7bc0\u7de8\u6392\u975e\u5e38\u597d\uff0c\u975e\u5e38\u5faa\u5e8f\u6f38\u9032\uff0c\u4e0d\u6703\u4e00\u4e0b\u5b50\u585e\u592a\u591a\u6771\u897f\u7d66\u4f60\uff0c\u8b93\u4f60\u8a18\u4e0d\u4f4f\u4e0d\u77e5\u9053\u600e\u9ebc\u7528\u3002\u53e6\u5916\u4e0d\u53ea\u662f\u55ae\u7d14 coding\uff0c\u4e5f\u542b\u6709\u5927\u91cf\u7db2\u9801\u6a19\u6e96\u7684\u6982\u5ff5\u3002<!--more--><\/p>\n<p>\u9019\u672c\u66f8\u63d0\u5230\u7684 DOM\u00a0Methods \u8ddf Properties \uff0c\u5176\u5be6\u9084\u883b\u5c11\u7684\uff0c\u7bc4\u4f8b\u4e5f\u90fd\u975e\u5e38\u597d\u61c2\uff0c\u6574\u672c\u66f8 follow \u5f88\u597d\u7684\u7db2\u9801\u6a19\u6e96\u89c0\u5ff5\uff0c\u5f37\u8abf\u00a0separate behavior from structure, progressive enhancement,graceful degradation \u7b49\uff0c\u544a\u8a34\u4f60\u70ba\u4ec0\u9ebc?\u597d\u8655\u58de\u8655?\u4ec0\u9ebc\u6642\u5019\u7528? \u6700\u5f8c\u7684<a href=\"http:\/\/domscripting.com\/domsters\/index.html\">\u6574\u5408\u7bc4\u4f8b<\/a>\u4e5f\u5f88\u7cbe\u91c7\u5be6\u7528\uff0c\u8cab\u5fb9 unobtrusive \u7684\u6982\u5ff5\uff0c\u5b8c\u5168\u90fd\u4e0d\u9700\u8981\u52d5\u5230 markup\u3002<\/p>\n<ul>\n<li>\u5229\u7528DOM \u64cd\u4f5c\u628a\u52d5\u4f5c\u52a0\u5230node\u7684event\u4e0a\u3002<\/li>\n<li>\u6f38\u9032\u5f0f\u7684\u589e\u5f37\uff0c\u91cd\u8981\u5167\u5bb9\u4ecd\u4ee5markup\u5448\u73fe\uff0cjavascript\u53ea\u662f\u589e\u5f37\u5167\u5bb9\uff0c\u95dc\u9589javascript\u4ecd\u53ef\u4ee5\u512a\u96c5\u7684\u9000\u5316\u3002<\/li>\n<li>CSS-DOM\u7684\u4e09\u500b\u6642\u6a5f : 1.\u5728\u4efb\u610f node tree\u4e0a\u52a0style (\u56e0\u70baCSS\u6709\u6642\u7121\u6cd5\u505a\u5230) 2.\u91cd\u8907\u7684 styling (\u5982\u8868\u683c\u5076\u6578\u884c\u4e0a\u8272)\u00a03. \u56de\u61c9\u67d0\u500bevent\u7684 stying (\u50cf\u662f\u56e0\u70ba :hover \u5728IE\u652f\u63f4\u8d85\u9023\u7d50a\u6a19\u7c64\u800c\u5df2\uff0c\u6240\u4ee5\u5fc5\u9808\u7528 DOM \u4f86\u9054\u6210)\u3002 4.animation(\u7528 setTimeout \u905e\u8ff4\u547c\u53eb)<\/li>\n<\/ul>\n<p>\u66f8\u672b\u8b1b\u5230 future\uff0c\u7576\u7136\u8981\u63d0\u5230\u76ee\u524d\u6700\u7d05\u7684Ajax\uff0c\u9019\u88e1\u6709\u4e00\u500b\u5927\u96e3\u984c\uff0cAjax\u8981\u600e\u9ebc\u80fd\u5920 degrade gracefully\u5462? \u5982\u679c\u6211\u5011\u4e00\u958b\u59cb\u8a2d\u8a08\u7db2\u7ad9\u7684\u6642\u5019\uff0c\u5c31\u5b8c\u5168\u4f7f\u7528Ajax\uff0c\u5c07\u5f88\u96e3\u6709 non-Ajax \u7248\u672c\uff0c\u6211\u5011\u770b\u5230Google\u7684\u90a3\u4e9b\u6771\u897f Javascript \u90fd\u662f\u5fc5\u8981\u7684! \u4f5c\u8005\u63d0\u5021Hijax( progress enhancement using Ajax)\uff0c\u5373\u4f7f\u95dc\u9589 Javascript \u4ecd\u80fd\u5920\u904b\u4f5c\u3002<\/p>\n<p>\u6700\u5f8c\u4f5c\u8005\u642c\u51fa\u4e86 Tim Berners (WWW\u767c\u660e\u4eba) \u7684\u8a71\u4f5c\u5c3e:<\/p>\n<blockquote><p>The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.<\/p><\/blockquote>\n<p>\u96a8\u8457 Web \u8d8a\u4f86\u8d8a Application platform\uff0c\u9084\u8981\u80fd\u5920\u4fdd\u6301\u6700\u5927\u7684 universality\uff0c\u4f5c\u8005\u8aaa at all costs! \u6703\u4e0d\u6703\u592a\u7406\u60f3\u4e86\u5462?<\/p>\n<p>anyway&#8230; \u5f37\u70c8\u63a8\u85a6\u9019\u672c\u66f8\u7576\u4f5c DOM Scripting\u5165\u9580\u5594\uff0c\u5f88\u597d\u8b80\u3002\u9019\u672c\u66f8\u8b93\u6211\u60f3\u8d77\u4ee5\u524d\u521d\u5b78CSS\u5ff5<a href=\"http:\/\/tlsj.tenlong.com.tw\/WebModule\/BookSearch\/bookSearchViewAction.do?isbn=0735712638&amp;sid=14564\"> Designing CSS Web Pages<\/a>\u7684\u611f\u89ba\uff0c\u7c21\u55ae\u537b\u5341\u5206powerful\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Update(2008\/5\/27): \u624b\u4e0a\u591a\u4e86\u672c\u5168\u65b0\u7684 DOM Scripting \u66f8\uff0c\u6b32\u552e $1000\uff0c\u8acb\u53c3 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ihower.tw\/blog\/1484-dom-scripting\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008DOM Scripting\u3009<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[9,33,5,4],"tags":[],"class_list":["post-1484","post","type-post","status-publish","format-standard","hentry","category-books","category-javascript","category-programming","category-web-design","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1q6tG-nW","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts\/1484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/comments?post=1484"}],"version-history":[{"count":0,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts\/1484\/revisions"}],"wp:attachment":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/media?parent=1484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/categories?post=1484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/tags?post=1484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}