Create if or statement for multiple instances - Javascript Statement

Javascript examples for Statement:if

Description

Create if or statement for multiple instances

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=function(){/*from  w ww .ja  v a  2 s.com*/
var fieldA = 'Yes';
var fieldB = 'No';
var fieldC = 'No';
if (fieldA == "Yes" || fieldB == "Yes" || fieldC == "Yes")
    document.getElementById('title').innerHTML ="TITLE";
else
    document.getElementById('title').innerHTML = "";
    }

      </script> 
   </head> 
   <body> 
      <span id="title"></span>  
   </body>
</html>

Related Tutorials