" into a document.createElement() way? because firf" name="description">
Can somebody help me in converting document.write
"<applet code="TestApplet2.class"></applet>"
into a document.createElement() way? because firfox extension is not allowing for document.write()
<html>
<body>
<div id="myDiv1"></div>
<div id="myDiv2"></div>
</body>
<script type="text/javascript">
var myDiv1 = document.getElementById("myDiv1");
var myDiv2 = document.getElementById("myDiv2");
myDiv1.innerHTML = "<b>Content of 1st DIV</b>";
myDiv2.innerHTML = "<i>Content of second DIV element</i>";
</script>
</html>
Please visit the following links:
http://www.roseindia.net/javascript/method-createelement.shtml
http://www.roseindia.net/javascript/javascript-insertbefore-method.shtml
I do not want to refer it by ID because i am writing an external javascript file which has a function to invoke an applet. Please help by changing this particular part :
document.write
"<applet code="TestApplet2.class"></applet>"
Please convert this line in such a way that it is equivalent to what is stated ..