Search
 
SCRIPT & CODE EXAMPLE
 

HTML

embed html

<!-- For an embed you use the iframe tag, which is a closed tag -->

<iframe></iframe>

<!-- and then for attaching websites or cloud videos, audios etc you use the src attribute -->

<iframe src="https://mywebsite.com"></iframe>
Comment

embed tag in html

<!-- embed tag in html -->
<!-- The <embed> tag defines a container for an external resource, 
such as a web page, a picture, a media player, 
or a plug-in application. -->

<!-- An embedded image: -->

<embed type="image/jpg" src="pic_trulli.jpg" width="300" height="200">

<!-- An embedded HTML page: -->

<embed type="text/html" src="snippet.html" width="500" height="200">

<!-- An embedded video: -->

<embed type="video/webm" src="video.mp4" width="400" height="300">
Comment

embed html

function HTMLImporter() {}

HTMLImporter.import = function (url) {
  var error, http_request, load, script;

  script =
    document.currentScript || document.scripts[document.scripts.length - 1];

  load = function (event) {
    var attribute, index, index1, new_script, old_script, scripts, wrapper;

    wrapper = document.createElement("div");
    wrapper.innerHTML = this.responseText;

    scripts = wrapper.getElementsByTagName("SCRIPT");

    for (index = scripts.length - 1; index > -1; --index) {
      old_script = scripts[index];

      new_script = document.createElement("script");
      new_script.innerHTML = old_script.innerHTML;

      for (index1 = old_script.attributes.length - 1; index1 > -1; --index1) {
        attribute = old_script.attributes[index1];
        new_script.setAttribute(attribute.name, attribute.value);
      }

      old_script.parentNode.replaceChild(new_script, old_script);
    }

    while (wrapper.firstChild) {
      script.parentNode.insertBefore(
        wrapper.removeChild(wrapper.firstChild),
        script
      );
    }

    script.parentNode.removeChild(script);

    this.removeEventListener("error", error);
    this.removeEventListener("load", load);
  };

  error = function (event) {
    this.removeEventListener("error", error);
    this.removeEventListener("load", load);

    alert("there was an error!");
  };

  http_request = new XMLHttpRequest();
  http_request.addEventListener("error", error);
  http_request.addEventListener("load", load);
  http_request.open("GET", url);
  http_request.send();
};
Comment

PREVIOUS NEXT
Code Example
Html :: call javascript function from a tag 
Html :: how to align photos center html 
Html :: html code contact form template 
Html :: toggle on-click button vue 
Html :: tailwind css text wrap 
Html :: html video 
Html :: rating star 
Html :: to centre each content in html 
Html :: html table email template 
Html :: Div and span 
Html :: how to code hello world in html 
Html :: html table row span 
Html :: html video autosize 
Html :: alpine js click preventdefault 
Html :: underline text in html 
Html :: click on button fire to another button 
Html :: placeholder in html select 
Html :: flex-end tailwind 
Html :: bootstrap input 
Html :: html link to pdf 
Html :: link in md 
Html :: html table 
Html :: angular bottom sticky footer 
Html :: captcha code 
Html :: html style attribute 
Html :: html tab icon title 
Html :: em tag in html5 
Html :: link mui 
Html :: html div grid 9x9 
Html :: how to add an input next to each other 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =