let's assume that the content is empty as given below.
<head>
</head>
If I want to change it dynamically to
<head>
<script src="jquery-1.8.0.min.js"></script>
</head>
is there anyway that AppInventor can do that?
You can select it and add to it as normal:
$('head').append('</script>');
JavaScript:
document.getElementsByTagName('head')[0].appendChild( ... );
Make DOM element like so:
script=document.createElement('</script>');
script.src='src';
document.getElementsByTagName('head')[0].appendChild(script);
Some simple javascript to change the innerHtml of document.head will work
document.head.innerHTML = "<script src=\"jquery-1.8.0.min.js\"></script>";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With