img tag
<img src="the source image's url" alt="the image's description">
img tag
<img src="the source image's url" alt="the image's description">
set img src using javascript
document.getElementById("imageid").src="../template/save.png";
js load img
var elements = [];
function loaded(){
console.log("you have loaded an image");
}
CreateFileFrom("your/dir/here/img.png");
function CreateFileFrom(dir){
/* defining runtime variables */
var extension = dir.split('.').pop();
var keys = {"png":"IMG","jpg":"IMG","jpeg":"IMG",
"js":"SCRIPT","json":"SCRIPT",
"mp3":"AUDIO","wav":"AUDIO"};
var obj = document.createElement(keys[extension]) || {};
obj.src = dir;
/* onload function called when the resource is loaded */
obj.onload = (e) => {
elements.push(e.path[0]);
loaded()
}
/* make sure that the data is compitable */
if(keys[extension]==null){console.error("not supported media type "+extension);return;}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us