{"id":21232,"date":"2023-02-14T05:38:30","date_gmt":"2023-02-14T05:38:30","guid":{"rendered":"https:\/\/www.booksofall.com\/tw\/?post_type=product&#038;p=21232"},"modified":"2023-02-14T05:39:07","modified_gmt":"2023-02-14T05:39:07","slug":"javascript-bible","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/","title":{"rendered":"JavaScript Bible"},"content":{"rendered":"<p>As <a href=\"https:\/\/en.wikipedia.org\/wiki\/JavaScript\">JavaScript<\/a>\u2019s creator, I would like to say a few words about where JavaScript has been, where it is going, and how the book you\u2019re holding will help you to make the most of the language.<\/p>\n<p>JavaScript was born out of a desire to let <a href=\"https:\/\/www.hostinger.com\/tutorials\/what-is-html\">HTML<\/a> authors write scripts directly in their documents. This may seem obvious now, but in the spring of 1995 it was novel and more than a little at odds with both the conventional wisdom (that HTML should describe static document structure only) and the Next Big Thing (Java applets, which were hyped as the one true way to enliven and extend Web pages). Once I got past these contentions, JavaScript quickly shaped up along the following lines:<\/p>\n<p>\u2726 \u201c<a href=\"https:\/\/javalite.io\/\">Java-lite<\/a>\u201d syntax. Although the \u201cnatural language\u201d syntax of <a href=\"https:\/\/en.wikipedia.org\/wiki\/HyperTalk\">HyperTalk<\/a> was fresh in my mind after a friend lent me <a href=\"https:\/\/archive.org\/details\/The_Complete_HyperCard_Handbook\">The Complete HyperCard Handbook<\/a> by some fellow named Goodman, the Next Big Thing weighed heavier, especially in light of another goal: scripting Java applets. If the scripting language resembled Java, then those programmers who made the jump from JavaScript to Java would welcome similarities in syntax. But insisting on Java\u2019s class and type declarations, or on a semicolon after each statement when a line ending would do, were out of the question \u2014 scripting for most people is about writing short snippets of code, quickly and without fuss.<\/p>\n<p>\u2726 Events for HTML elements. Buttons should have onClick event handlers. Documents load and unload from windows, so windows should have onLoad and onUnload handlers. Users and scripts submit forms: thus the onSubmit handler. Although not initially as flexible as HyperCard\u2019s messages (whose handlers inspired the onEvent naming convention), JavaScript events let HTML authors take control of user interaction from remote servers and respond quickly to user gestures and browser actions. With the adoption of the W3C DOM Level 2 event handling recommendations, JavaScript in modern browsers has fully flexible control over events.<\/p>\n<p>\u2726 Objects without classes. The Self programming language proved the notion of prototype-based inheritance. For JavaScript, I wanted a single prototype per object (for simplicity and efficiency), based by default on the function called using the new operator (for consonance with Java). To avoid distinguishing constructors from methods from functions, all functions receive the object naming them as the property that was called, in the this parameter. Although prototypes didn\u2019t appear until Navigator 3, they were prefigured in Version 2 by quoted text being treated as an object (the String object prototype, to which users could attach methods).<\/p>\n<p>\u2726 Generated HTML. Embedding JavaScript in HTML gave rise to a thought: Let the script speak HTML, as if the emitted text and markup were loaded in place of the script itself. The possibilities went beyond automating current or last-modified dates, to computing whole trees of tables where all the repeated structure was rolled up in a scripted loop, while the varying contents to be tabulated came in minimal fashion from JavaScript objects forming a catalog or mini-database.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 700px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/all-199qnu9nzj?enforceShowPromotionBar=true&amp;p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":21237,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":""},"product_brand":[],"product_cat":[277],"product_tag":[],"class_list":{"0":"post-21232","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-javascript","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>JavaScript Bible - BooksOfAll Traditional Chinese<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"JavaScript Bible - BooksOfAll Traditional Chinese\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Traditional Chinese\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-14T05:39:07+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png\" \/>\n<meta name=\"twitter:label1\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/\",\"url\":\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/\",\"name\":\"JavaScript Bible - BooksOfAll Traditional Chinese\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png\",\"datePublished\":\"2023-02-14T05:38:30+00:00\",\"dateModified\":\"2023-02-14T05:39:07+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png\",\"width\":\"467\",\"height\":\"608\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/tw\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/tw\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"JavaScript Bible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/#website\",\"url\":\"https:\/\/www.booksofall.com\/tw\/\",\"name\":\"BooksOfAll Traditional Chinese\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/tw\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/#organization\",\"name\":\"BooksOfAll Traditional Chinese\",\"url\":\"https:\/\/www.booksofall.com\/tw\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Traditional Chinese\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"JavaScript Bible - BooksOfAll Traditional Chinese","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/","og_locale":"zh_TW","og_type":"article","og_title":"JavaScript Bible - BooksOfAll Traditional Chinese","og_url":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/","og_site_name":"BooksOfAll Traditional Chinese","article_modified_time":"2023-02-14T05:39:07+00:00","og_image":[{"url":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png","twitter_misc":{"\u9810\u4f30\u95b1\u8b80\u6642\u9593":"2 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/","url":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/","name":"JavaScript Bible - BooksOfAll Traditional Chinese","isPartOf":{"@id":"https:\/\/www.booksofall.com\/tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png","datePublished":"2023-02-14T05:38:30+00:00","dateModified":"2023-02-14T05:39:07+00:00","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/tw\/javascript-bible\/"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#primaryimage","url":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png","contentUrl":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/02\/img_63eb1c3e828b2.png","width":"467","height":"608"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/tw\/javascript-bible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/tw\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/tw\/categories\/"},{"@type":"ListItem","position":3,"name":"JavaScript Bible"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/tw\/#website","url":"https:\/\/www.booksofall.com\/tw\/","name":"BooksOfAll Traditional Chinese","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/tw\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/tw\/#organization","name":"BooksOfAll Traditional Chinese","url":"https:\/\/www.booksofall.com\/tw\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Traditional Chinese"},"image":{"@id":"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product\/21232","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/media\/21237"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/media?parent=21232"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product_brand?post=21232"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product_cat?post=21232"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product_tag?post=21232"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}