Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
[b]var[/b] s=document.createElement([i]'script'[/i]);
s.src=[i]'where/is/your/script.js'[/i];
[b]var[/b] h=document.getElementsByTagName([i]'head'[/i])[0];
h.appendChild(s);
<html>
<head>
<title></title>
<script type="text/javascript">
[red]var inter;[/red]
function hmm()
{
var headID = window.document.getElementsByTagName("HEAD")[0];
var newScript = window.document.createElement("SCRIPT");
newScript.type = "text/javascript";
newScript.src = "js.js";
headID.appendChild(newScript);
[red]inter=window.setInterval('wait4load()',100);[/red]
}
[red]function wait4load()
{
if (imloaded) {
window.clearInterval(inter);
alert('3');
}
}[/red]
</script>
</head>
<body onload="hmm()">
</body>
</html>
alert('teste.js');
[red]var imloaded=true;[/red]