Forum : date and time function ,connecting two or more properties or functions
Brief description  about Online courses   join in Online courses
View avinash j j 's Profile

date and time function ,connecting two or more properties or functions

dear sir/madem
firstly ,what is the command for a date and time function and how do we put it in a onclick command and for example <INPUT TYPE = Button VALUE = "one " Onclick = "document.bgColor = 'yellow'";document.write='red'"> is this command correct to change the background colour and change the colour of the text in one click if not please HELP and how do we connect two or more functions on an onclick command
Asked by avinash j j | Aug 16, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Avinash,

first create on date object as shown below,
<script type="text/javascript">

var d=new Date();
document.write(d);

</script>

if one or two js statements means, directly write inside events separated by semicolon, if not embed whole code in one function and then call that function through event.

in the above, u have written wrong,
replace this instead,
OnClick = "document.bgColor='yellow'; document.write='red';"
Aug 17, 2010