Go to Post FIRST is an organization where you leave lasting impressions on people you don't even know. - rtfgnow [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 11-02-2012, 20:17
Stonemotmot Stonemotmot is offline
Registered User
FRC #0486
 
Join Date: Sep 2011
Location: United States, Pa
Posts: 53
Stonemotmot is an unknown quantity at this point
Help with website

Hello, my team is working on the website and were trying to do some java script but could not get it to work could someone tell me what is wrong with this simple script.

<html>
<head>

</head>
<body>

<h1>Team #</h1>
<p id="demo"></p>

<button type="button" onclick="displayDate()">Display Date</button>
<script type="text/javascript">

var a =1;
function displayDate()
{
a=a+2;
}

if (a==1)
{
document.getElementById("demo").innerHTML="Hello";
}
else
{
document.getElementById("demo").innerHTML="GoodBye ";
}

</script>

</body>
</html>
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 17:25.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi