<html>
<head>
<script type="text/javascript" >
function fn() {
document.write("Hello there!!!");
}
</script>
</head>
<body>
<button onclick="fn()">click</button>
</body>
</html>
After clicking the button , FF keeps on spinning (11.0), while as if I directly call the fn() without wiring it to the button , it works fine.Could anyone please look into this ?
You need to call
document.close().document.writecallsdocument.openif the document hasn’t been opened. As long as the document isn’t closed again withdocument.closethe browser will indicate that the page is subject to change.