{"id":1238,"date":"2006-10-17T14:40:10","date_gmt":"2006-10-17T06:40:10","guid":{"rendered":"http:\/\/ihower.idv.tw\/blog\/archives\/1238"},"modified":"2007-02-11T22:09:14","modified_gmt":"2007-02-11T14:09:14","slug":"prototype-%e7%b0%a1%e4%bb%8b","status":"publish","type":"post","link":"https:\/\/ihower.tw\/blog\/1238-prototype-%e7%b0%a1%e4%bb%8b","title":{"rendered":"Prototype \u7c21\u4ecb"},"content":{"rendered":"<p><a href=\"http:\/\/prototype.conio.net\/\"><img decoding=\"async\" src=\"http:\/\/www.ajaxian.com\/images\/prototype.png\" \/><\/a><\/p>\n<p>Prototype \u4f3c\u4e4e\u662f\u76ee\u524d\u6700\u7d05 javascript framework\uff0c\u4f5c\u8005\u5584\u7528\u4e86Javascript\u7269\u4ef6\u5c0e\u5411\u7684\u7279\u6027\uff0c\u589e\u5f37\u4e86 Javascript \u7684\u529f\u80fd\u8207\u958b\u767c\u4fbf\u5229\u6027\u3002\u5728\u5be6\u969b\u770b\u904e\u4e4b\u5f8c\uff0c\u767c\u73fe\u5b83\u4e26\u4e0d\u662f\u4e00\u5957\u5305\u88dd\u592a\u591a\u7684\u67b6\u69cb(\u50cf\u662f\u52d5\u756b\u7279\u6548\u7684\u6771\u897f\u5c31\u4e0d\u5728\u88e1\u9762)\uff0c\u4e5f\u56e0\u6b64\u4e5f\u6709\u4e00\u4e9b framework \u5982 <a href=\"http:\/\/script.aculo.us\/\">Script.aculo.us<\/a>\u00a0\u662f\u4ee5 Prototype \u70ba\u57fa\u790e\u4f86\u958b\u767c\u7684\u3002\u7576\u7136\uff0c\u9084\u6709 Ruby on Rails \u4e5f\u7528 prototype \u4f86\u9054\u6210 Ajax \u529f\u80fd\u3002<\/p>\n<p><strong>\u53c3\u8003\u8cc7\u6e90<\/strong><\/p>\n<ul>\n<li><a href=\"http:\/\/particletree.com\/features\/quick-guide-to-prototype\/\">Quick Guide to Prototype<\/a><\/li>\n<li><a href=\"http:\/\/blogs.ebusiness-apps.com\/jordan\/pages\/Prototype%20Library%20Info.htm\">Overview of the Prototype Javascript Library<\/a>\u00a0<\/li>\n<li><u><font color=\"#810081\"><a href=\"http:\/\/www.sergiopereira.com\/articles\/prototype.js.html\">Developer Notes for prototype.js<\/a><\/font><\/u><\/li>\n<li><a href=\"http:\/\/wiki.script.aculo.us\/scriptaculous\/show\/Prototype\">Prototype in scriptaculous wiki<\/a><\/li>\n<li><a href=\"http:\/\/www.snook.ca\/archives\/javascript\/prototype_disse\/\">Prototype Dissected()<\/a><\/li>\n<li><a href=\"http:\/\/tlsj.tenlong.com.tw\/WebModule\/BookSearch\/bookSearchViewAction.do?isbn=9574423522&amp;sid=30354\">Ajax \u7db2\u9801\u7a0b\u5f0f\u8a2d\u8a08<\/a> \u6c88\u6642\u5b87<\/li>\n<\/ul>\n<p>\u5b83\u5927\u6982\u5305\u542b\u4e86\u54ea\u4e9b\u6771\u897f\u5462? \u4f8b\u5982\u6709:\u00a0<\/p>\n<p><!--more--><\/p>\n<p><strong>Base<\/strong><\/p>\n<ul>\n<li>Class \u7269\u4ef6\u63d0\u4f9b\u5efa\u7acb\u985e\u5225\u7684\u65b9\u5f0f\uff0c\u8b93\u4f60\u53ef\u4ee5\u7528 new \u8a9e\u6cd5\u5efa\u7acb\u6709\u5efa\u69cb\u5b50\u7684\u7269\u4ef6\u3002<\/li>\n<li>Object.extend \u63d0\u4f9b\u7e7c\u627f\u7684\u8a9e\u6cd5<\/li>\n<li>try.these \u8b93\u4f60\u4f9d\u5e8f\u57f7\u884c \u4e00\u4e9b\u53ef\u80fd\u6703\u4e1f\u4f8b\u5916\u7684 function<\/li>\n<li>PeriodicalExecuter \u9031\u671f\u57f7\u884c\u67d0function<\/li>\n<li>$(&#8220;elementID&#8221;) \u5373 document.getElementById(&#8220;elementID&#8221;) \u7684\u65b9\u4fbf\u7528\u6cd5<\/li>\n<\/ul>\n<p><strong>String<\/strong><\/p>\n<ul>\n<li>\u64f4\u5145\u672c\u4f86\u7684 String \u7269\u4ef6\uff0c\u65b0\u589e\u4e00\u4e9bfunction\u3002\u00a0<\/li>\n<\/ul>\n<p><strong>Enumerable<\/strong><\/p>\n<ul>\n<li>\u63d0\u4f9b\u5404\u7a2e\u8fed\u4ee3\u7684function\uff0c\u4e0d\u904e\u597d\u7528\u6b78\u597d\u7528\uff0c\u5c0f\u5fc3<a href=\"http:\/\/particletree.com\/notebook\/beware-of-javascript-library-overkill\/\">\u6548\u7387\u554f\u984c<\/a>\u3002<\/li>\n<\/ul>\n<p><strong>Array<\/strong><\/p>\n<ul>\n<li>\u64f4\u5145\u4e86\u672c\u4f86\u7684 Array\uff0c\u53e6\u5916\u63d0\u4f9b $A() \u4f86\u8f49\u6210 Enumerable Object<\/li>\n<\/ul>\n<p><strong>Ajax<\/strong><\/p>\n<ul>\n<li>Ajax.Request \u767c\u9001 ajax request<\/li>\n<li>Ajax.Updater \u540c\u4e0a\uff0c\u4f46\u662f\u76f4\u63a5\u5c07\u50b3\u56de\u7684html\u66f4\u65b0\u5230\u7db2\u9801\u6307\u5b9a\u7684id<\/li>\n<li>Ajax.PeriodicalUpdater \u540c\u4e0a\uff0c\u9031\u671f\u57f7\u884c<\/li>\n<\/ul>\n<p><strong>DOM<\/strong><\/p>\n<ul>\n<li>\u63d0\u4f9b document.getElementsByClassName(className) \u8b93\u4f60\u6839\u64da class name\u62ff DOM element\u00a0<\/li>\n<li>\u63d0\u4f9b\u00a0Element \u7269\u4ef6\u53ef\u4ee5\u76f4\u63a5\u64cd\u4f5c DOM\uff0c\u5982 Element.addClassName \u53ef\u4ee5\u52a0 class name \u7b49<\/li>\n<\/ul>\n<p><strong>Form<\/strong><\/p>\n<ul>\n<li>\u63d0\u4f9b\u5c0d\u8868\u55ae\u7684\u8655\u7406\uff0c\u5982 $F() \u53ef\u4ee5\u53d6\u503c\uff0cForm.serialize \u53ef\u4ee5\u5e8f\u5217\u5316\u8868\u55ae\u8cc7\u6599 \u65b9\u4fbf\u9001 ajax request<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Prototype \u4f3c\u4e4e\u662f\u76ee\u524d\u6700\u7d05 javascript framework\uff0c\u4f5c\u8005\u5584\u7528\u4e86Javascript\u7269 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/ihower.tw\/blog\/1238-prototype-%e7%b0%a1%e4%bb%8b\" class=\"more-link\">\u95b1\u8b80\u5168\u6587<span class=\"screen-reader-text\">\u3008Prototype \u7c21\u4ecb\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":[33,5,4],"tags":[],"class_list":["post-1238","post","type-post","status-publish","format-standard","hentry","category-javascript","category-programming","category-web-design","entry"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1q6tG-jY","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts\/1238","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=1238"}],"version-history":[{"count":0,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/posts\/1238\/revisions"}],"wp:attachment":[{"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/media?parent=1238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/categories?post=1238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ihower.tw\/blog\/wp-json\/wp\/v2\/tags?post=1238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}