Home > Back-end >  Beginners Java does not know the tenth one have what mistake
Beginners Java does not know the tenth one have what mistake

Time:09-30


<meta HTTP - equiv="content-type" Content="text/HTML. Charset=utf-8 "/& gt;
If statement format instance & lt;/title> <br/></head> <br/><script> <br/>Var date=new date (); <br/>Var time=date. GetHours (); <br/>If (time>=6 & amp; & Time<12)={<br/>Alert (" the time now is: "+ time); <br/>} <br/>The else <br/>{alert (" now the time is "+ time); } <br/></script> <br/><body> <br/></body> <br/></html> <br/><p class="article - content rp"> CodePudding user response: </p>Visual don't see what the problem, you check your punctuation is English format, also, this is not a Java, this is js<p class="article - content rp"> CodePudding user response: </p>Visual is the double quotation marks in the Chinese, you can compare the alert with double quotes and HTML tags or meta this tag in the use of double quotes, you will know,<p class="article - content rp"> CodePudding user response: </p>To tell you the partial problem, your the if/else what is the meaning of ha ha ha </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/Backend/41951.html" target="_blank" style="color:#999">https//www.codepudding.com/Backend/41951.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/Backend/41950.html'>Tencent AI signature is invalid</a></div> <div class="detail-arr-right">Next:<a href='/Backend/41952.html'>Everyone give me the newcomer disambiguation</a></div> </div> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="hot-tags neitags"> <ul> <li><i class="iconfont icon-x-tags"></i> Tags:  </li> <a href='/e/tags/?tagname=Java+related' target='_blank'>Java related</a> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="xiangguan"> <ul class="msg msghead"> <li class="tbname">Related</li> </ul> <ul> </ul> </div> </div> </div> </div> <div class="container th_top"> <div class="row"> <div class="col-md-12"> <div class="flinks"> <ul> <li><i class="iconfont icon-x-tags"></i> Links:  </li> <li class="liflinks"><a target="_blank" href="/" title="CodePudding">CodePudding</a></li> </ul> </div> </div> </div> </div> <div class="footer"> <p><span style="font-size:16px;color:#666;font-weight: bold">About Us:</span>  <a href="https://www.codepudding.com/contact.html">Contact Us</a>      <a href="https://www.codepudding.com/service.html">Terms of Service</a>      <a href="https://www.codepudding.com/privacy.html"> Privacy Policy</a></p> <p class="foot_info">Copyright © 2010-2023,Powered By <a href="/" target="_blank">CodePudding</a> </p> </div> <script type="text/javascript" src="/skin/code/tianhu.js"></script> </body></html>