{"version":"1.0","provider_name":"JavaScript Tutorial","provider_url":"https:\/\/techkubo.com\/javascript","title":"JavaScript Where To - JavaScript Tutorial","type":"rich","width":600,"height":338,"html":"<blockquote class=\"wp-embedded-content\" data-secret=\"cZlVgYJ1mv\"><a href=\"https:\/\/techkubo.com\/javascript\/javascript-where-to\/\">JavaScript Where To<\/a><\/blockquote><iframe sandbox=\"allow-scripts\" security=\"restricted\" src=\"https:\/\/techkubo.com\/javascript\/javascript-where-to\/embed\/#?secret=cZlVgYJ1mv\" width=\"600\" height=\"338\" title=\"&#8220;JavaScript Where To&#8221; &#8212; JavaScript Tutorial\" data-secret=\"cZlVgYJ1mv\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\" class=\"wp-embedded-content\"><\/iframe><script>\n\/*! This file is auto-generated *\/\n!function(d,l){\"use strict\";l.querySelector&&d.addEventListener&&\"undefined\"!=typeof URL&&(d.wp=d.wp||{},d.wp.receiveEmbedMessage||(d.wp.receiveEmbedMessage=function(e){var t=e.data;if((t||t.secret||t.message||t.value)&&!\/[^a-zA-Z0-9]\/.test(t.secret)){for(var s,r,n,a=l.querySelectorAll('iframe[data-secret=\"'+t.secret+'\"]'),o=l.querySelectorAll('blockquote[data-secret=\"'+t.secret+'\"]'),c=new RegExp(\"^https?:$\",\"i\"),i=0;i<o.length;i++)o[i].style.display=\"none\";for(i=0;i<a.length;i++)s=a[i],e.source===s.contentWindow&&(s.removeAttribute(\"style\"),\"height\"===t.message?(1e3<(r=parseInt(t.value,10))?r=1e3:~~r<200&&(r=200),s.height=r):\"link\"===t.message&&(r=new URL(s.getAttribute(\"src\")),n=new URL(t.value),c.test(n.protocol))&&n.host===r.host&&l.activeElement===s&&(d.top.location.href=t.value))}},d.addEventListener(\"message\",d.wp.receiveEmbedMessage,!1),l.addEventListener(\"DOMContentLoaded\",function(){for(var e,t,s=l.querySelectorAll(\"iframe.wp-embedded-content\"),r=0;r<s.length;r++)(t=(e=s[r]).getAttribute(\"data-secret\"))||(t=Math.random().toString(36).substring(2,12),e.src+=\"#?secret=\"+t,e.setAttribute(\"data-secret\",t)),e.contentWindow.postMessage({message:\"ready\",secret:t},\"*\")},!1)))}(window,document);\n<\/script>\n","description":"Inline JavaScript Inline&nbsp;JavaScript&nbsp;is&nbsp;written&nbsp;directly&nbsp;within&nbsp;an&nbsp;HTML&nbsp;element&#8217;s&nbsp;attribute.&nbsp;This&nbsp;method&nbsp;is&nbsp;typically&nbsp;used&nbsp;for&nbsp;small&nbsp;snippets&nbsp;of&nbsp;code. Explanation of Code: In&nbsp;this&nbsp;example,&nbsp;the&nbsp;JavaScript&nbsp;code&nbsp;is&nbsp;placed&nbsp;within&nbsp;the&nbsp;onclick&nbsp;attribute&nbsp;of&nbsp;the&nbsp;&lt;button&gt;&nbsp;element.&nbsp;When&nbsp;the&nbsp;button&nbsp;is&nbsp;clicked,&nbsp;an&nbsp;alert&nbsp;box&nbsp;displays&nbsp;the&nbsp;message&nbsp;&#8220;Hello, World!&#8221;. Internal JavaScript Internal&nbsp;JavaScript&nbsp;is&nbsp;written&nbsp;within&nbsp;the&nbsp;&lt;script&gt;&nbsp;tag,&nbsp;inside&nbsp;the&nbsp;HTML&nbsp;file.&nbsp;It&nbsp;can&nbsp;be&nbsp;placed&nbsp;in&nbsp;the&nbsp;&lt;head&gt;&nbsp;or&nbsp;&lt;body&gt;&nbsp;section&nbsp;of&nbsp;the&nbsp;document. Explanation of Code: The&nbsp;JavaScript&nbsp;code&nbsp;is&nbsp;placed&nbsp;inside&nbsp;a&nbsp;&lt;script&gt;&nbsp;tag&nbsp;within&nbsp;the&nbsp;&lt;head&gt;&nbsp;section.&nbsp;The&nbsp;function&nbsp;showMessage&nbsp;is&nbsp;defined,&nbsp;and&nbsp;it&nbsp;is&nbsp;called&nbsp;when&nbsp;the&nbsp;button&nbsp;is&nbsp;clicked. External JavaScript External&nbsp;JavaScript&nbsp;is&nbsp;written&nbsp;in&nbsp;a&nbsp;separate&nbsp;.js&nbsp;file,&nbsp;which&nbsp;is&nbsp;then&nbsp;linked&nbsp;to&nbsp;the&nbsp;HTML&nbsp;document.&nbsp;This&nbsp;method&nbsp;keeps&nbsp;the&nbsp;HTML&nbsp;and&nbsp;JavaScript&nbsp;code&nbsp;separate,&nbsp;making&nbsp;the code&nbsp;easier&nbsp;to&nbsp;maintain. Explanation [&hellip;]","thumbnail_url":"https:\/\/techkubo.com\/javascript\/wp-content\/uploads\/sites\/7\/2024\/11\/Screenshot-2025-05-13-181552.png","thumbnail_width":1550,"thumbnail_height":912}