Search DaTutorials:  
HOME
VB Script Tutorials
Introduction
Reference
Tutorials

Using logical operators

Description:


How to use logical operators for complex conditional statesments.

Code:


<html>
<body>
<head>
<script type="text/vbscript">

function Test()
  var1 = true
  var2 = false
  var3 = false
  var4 = false

if ((var1 or var2) and (var3 or var4)) then
document.write("got inside...")
 else document.write("got ELSE...")
end if
end function

</script>

</head>
<body>
<p>
<script type="text/vbscript">
Test()
</script>
</p>

</body>
</html>

See working example:


Keywords:

VBScript: function, logical operators , if...else

DHTML: document.write


     Homeowner Loans | Loans | Mobile Phones | Watch How I Met Your Mother Online | Mortgage
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp