alert msg box
<HTML>
<HEAD>
<TITLE>Tilte of the web page</TITLE>
<SCRIPT language="javascript">
alert(document.title);
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
In the above example, we get a pop-up box indicating the title of that webpage...
If I want background color to be changed with that pop-up box, I replaced code with alert(document.bgColor="red"); but I am not getting any change in the background color. Why so?
Is it that we should mention such property only in OnClick code?? Can't we give it in alert box directly?