Conditional Operator : Conditional Operator : Operators JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Operators » Conditional Operator »

 

Conditional Operator

















<html>
<head>
<title>Conditional Operator Demo</title>

<script language="javascript" type="text/javascript">
<!--

confirmVal = confirm("click");
alertStr = confirmVal ? "You clicked OK""You clicked Cancel";
alert(alertStr);

//-->
</script>

</head>
<body>

<h1>JavaScript Test Page</h1>

</body>
</html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Operators
» Conditional Operator