Home > front end >  Js small white why didn't my onclick triggers for help
Js small white why didn't my onclick triggers for help

Time:09-21



<meta charset="utf-8">
No title documents & lt;/title> <br/><style type="text/css"> <br/>Body {background - image: url (../imges/03. PNG); Background - size: cover; Background - repeat: no - repeat; } <br/>Dl # {margin - top: 200 px; Margin - left: auto; Margin - right: auto; Width: 600 px; height:200px; Color: # CCC; Background - color: # F00; The font-family: "Microsoft jas black"; The font - size: 20 px; The font - weight: bolder; text-align:center; Padding - top: 40 px; } <br/># bt {border: the outset; Border - color: # 6 f; text-align:center; Margin - left: auto; Margin - right: auto; Margin - top: 50 px; Height: 10 px; Width: 90 px; Color: # FFF. Border - the radius: 50 px; Background - color: # 6 f; The font-family: "Microsoft jas black"; The font - size: 20 px; The font - weight: bolder; The line - height: 28 px; Cursor: pointer; Padding - bottom: 30 px; Padding - top: 5 px; } <br/></style> <br/><The script type="text/javascript" & gt; <br/>Var namelist=[" detective ", "Daisy", "zhang", "li si", "seven" sun]. <br/>Var mytime=null; <br/>The function doit () {<br/>Var bt=window. The document. The getElementById (" bt "); If (mytime=null) {<br/>Bt. InnerHTML="stop named"; <br/>show(); <br/>} else {<br/>Bt. InnerHTML="began to roll call"; ClearTimeout (mytime); <br/>Mytime=null; <br/>} <br/>} <br/>The function show () {<br/>Var dl=window. The document. The getElementById (" dl "); <br/>Var num=Math. Floor (Math. The random () * namelist in length). Dl. InnerHTML=namelist [num]; <br/>Mytime=setTimeout (" show () ", 1); <br/>} <br/></script> <br/></head> <br/><body> <br/><Div id="dl" & gt; Dear friends, ready to roll? </div> <br/><Div id="bt" onClick="doit ()" & gt; Going to call the roll & lt;/div> <br/></body> </html><p class="article - content rp"> CodePudding user response: </p>Two comparison operator=<br/>If (mytime==null)<p class="article - content rp"> CodePudding user response: </p><fieldset> <legend> reference 1/f, the sky wave response: <legend> <blockquote> two comparison operator=<br/>If (mytime==null) </blockquote> <fieldset> <br/>Thank you thank you <img SRC="https://img.codepudding.com/202009/91284210917351.gif" Alt=""/> found can be used<p class="article - content rp"> CodePudding user response: </p><fieldset> <legend> reference 1/f, the sky wave response: <legend> <blockquote> two comparison operator=<br/>If (mytime==null) </blockquote> <fieldset> <br/>Thank you thank you <img SRC="https://img.codepudding.com/202009/91284210917351.gif" Alt=""/> found can be used </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/17838.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/17838.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/16869.html'>Has intercepted across source request: the same-origin policy prohibit read remote resources at http</a></div> <div class="detail-arr-right">Next:<a href='/frontend/17839.html'>Different client login account</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=JavaScript' target='_blank'>JavaScript</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>