Different background colors by clicking buttpns?
>> Wednesday, June 8, 2011
<HTML>
<BODY>
<INPUT TYPE = Button VALUE = "Colour One" Onclick = "document.bgColor = 'Red'">
<INPUT TYPE = Button VALUE = "Colour Two" Onclick = "document.bgColor = 'Blue'">
<INPUT TYPE = Button VALUE = "Colour Three" Onclick = "document.bgColor = 'Green'">
</BODY>//The background colour of your web page should have changed colour when you clicked a button.
It did this because of the bgColor poperty of the document object.
</HTML>
<BODY>
<INPUT TYPE = Button VALUE = "Colour One" Onclick = "document.bgColor = 'Red'">
<INPUT TYPE = Button VALUE = "Colour Two" Onclick = "document.bgColor = 'Blue'">
<INPUT TYPE = Button VALUE = "Colour Three" Onclick = "document.bgColor = 'Green'">
</BODY>//The background colour of your web page should have changed colour when you clicked a button.
It did this because of the bgColor poperty of the document object.
</HTML>
0 comments:
Post a Comment