Basically what I’m trying to do is get an image to display using JavaScript. I’m using the code below and of course it’s not working. I have no idea why, but all that is displayed is the location of where the image is. I’ve tried different variations of this code with no luck. Can anyone help out? Thanks!
<script type=“text/javascript”>
function car (image) {
var image = new Image();
image.src = “ta.jpg”;
document.write(image.src);
}
</script>
<body onLoad=“car()”>
</body>
FYI… I’m using a JavaScript page and the file is saved as .htm, this is why there’s no header or html tags.