Snippets - General


Function that writes to a div with id='message' on the page.

function write(message){ 
    document.getElementById('message').innerText += message;
}

Displaying YouTube Videos

Dynamically create an html script element

function loadVideoDetails (videoindex) { 
var script = document.createElement("script");
script.setAttribute("src","https://. . . ");
document.getElementsByTagName('head')[0].appendChild(script)
}


© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrev