Javascript examples for Statement:if
Create if or statement for multiple instances
<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>