Sullivan Market

a web based full-circle development system



My JavaScript Tutorials - If...Else Statements

Here's the Javascript:

<script language="JavaScript">
<!--
function jsAlert()
{
var x = 5;
if (x = 5)
{
alert("x equals 5");
}
else
{
alert("x does not equal 5");
}
}

// -->
</script>
<a href="javascript:jsAlert()">Press for Alert!</a>

Try it out:

Press for alert!

Note: You can see the syntax for Alert on our alert page.

Back To JavaScript Tutorials

©2012 SullivanMarket.com