I am new to javascript as well as jQuery. This is the only code I have on a blank page:
<script type="text/javascript" src="jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
document.write('Hello World');
});
</script>
When I load a page in a browser (using FireFox), the status icon, as well as the icon area of ββthe open tab, display the loaded characters, as if they indicated that the document.write function runs continuously in a loop.
Why is this? I'm just trying to say "as soon as the page is ready to display the string Hello World ONCE." What is wrong here?
ps I noticed that if you pull out the document. Already part of the code is missing a loop. I don't know why this event handler caused this problem.
source
share