Home > front end >  Jquery and js external references in HTML 5
Jquery and js external references in HTML 5

Time:09-17

 & lt; ! DOCTYPE html> 


<meta charset="utf-8" & gt;
By the media company to culture supplies network & lt;/title> <br/><link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/css/basic.css" & gt; <br/><script SRC="https://bbs.csdn.net/topics/js/jquery-3.4.1.min.js" & gt; </script> <br/><script SRC="https://bbs.csdn.net/topics/js/html5.js" & gt; </script> <br/></head> <br/><body> <br/><br/><p> <br/><br/><br/><script> <br/>Var index=0; <br/>The $(document). Ready {function () {<br/>SetInterval {next "()", 3000}; <br/>}}; <br/><br/>The function next () {<br/>$(" li: eq (" + index + ") "). The fadeOut (1500); <br/>If (index==2) <br/>The index=0; <br/>The else <br/>Index++; <br/>$(" li: eq (" + index + ") "). The fadeIn (1500); <br/>} <br/><br/>The function closeImage (name) {<br/>$(" # showImage "). FadeIn (500); <br/>$(" productImg "). Attr (" SRC ", "images/product/large/" + name +". JPG "); <br/>} <br/><br/>The function closeImage () {<br/>$(" # showTmage "). The fadeOut (500); <br/>} <br/></script> <br/></div> <br/></p> <br/><br/></body> <br/></html> </pre> <br/><br/>Only posted on the parts related to the js, but there was no dynamic effect, <br/><br/><br/><img SRC="https://img.codepudding.com/202009/78197170405461.png" Alt=""/> <br/><img SRC="https://img.codepudding.com/202009/78197170405462.png" Alt=""/> <br/><br/><br/>Dynamic effect is a web page can't show, this is js cannot external references <br/><pre> & lt; ! DOCTYPE html> <br/><html> <br/><head> <br/><title> The design and implementation of a simple electronic calendar & lt;/title> <br/><Mata charset="utf-8" & gt; <br/><link rel="stylesheet" type="text/CSS" href="https://bbs.csdn.net/topics/css/calendar.css" & gt; <br/><The script type="calendar. Js & gt;" </script> <br/></head> </pre> <br/><br/><pre> var today=new Date (); <br/>Var year=today. GetFullYear (); <br/><br/>Var month=today, getMonth () + 1; <br/><br/>Var day=today. GetDate (); <br/><br/>Var allday=0; <br/><br/>The function count () {<br/>If (the month!=2) {<br/>If ((the month==4) | | (month==6) | | (9) month==| | (month==11)) {<br/>Allday=30; <br/>} else {<br/>Allday=31; <br/>} <br/>} else {<br/>If (((year % 4)==0 & amp; & (year 100) %! %=0) | | (year 400)==0) {<br/>Allday=29; <br/>} else {<br/>Allday=28; <br/>} <br/>} <br/>} <br/><br/>The function showMonth () {<br/>Var year_month=year + "years" + month + "month"; <br/>Document. The getElementById (" month "). The innerHTML=year_month; <br/>} <br/><br/>The function showDate () {<br/>ShowMonth (); <br/>The count (); <br/><br/>Var firstdate=new Date (year, month - 1, 1); <br/><br/>Var xiqi=firstdate. GetaDay (); <br/><br/>Var deterow=document. GetElementById (" day "); <br/>Daterow. InnerHTML=""; <br/><br/>If (xiqi!=0) {<br/>For (var I=0; i<Xiqi; I++) {<br/>Var dayElement=document. CreatElement (" div "); <br/>DayElement. ClassName="everyday"; <br/>Daterow. The appendChild (dayElement); <br/>} <br/>} <br/><br/>For (var j=1; J & lt;=allday; J++) {<br/>Var dayElement=document. CreatElement (" div "); <br/>DayElement. ClassName="everyday"; <br/>DayElement. InnerHTML=j + ""; <br/><br/>If (j==day {<br/>DayElement. Style. Color="red"; <br/>} <br/><br/>Daterow. The appendChild (dayElement); <br/>} <br/>} <br/><br/>The function lastMonth () {<br/>If (the month & gt; 1) {<br/>The month==1; <br/>} else {<br/>The month=12; <br/>Year -=1; <br/>} <br/>ShowDate (); <br/>} <br/><br/>The function nextMonth () {<br/>If (month<12) {<br/>The month +=1; <br/>} else {<br/>The month=1; <br/>Year +=1; <br/>} <br/>ShowDate (); <br/>} </pre> <br/><img SRC="https://img.codepudding.com/202009/78197170405463.png" Alt=""/> <br/><img SRC="https://img.codepudding.com/202009/78197170405464.png" Alt=""/> <br/><br/>27 rows ";" I am sure in English and after saved, <br/>Hope leaders help small white! <br/><br/><br/><br/><p class="article - content rp"> CodePudding user response: </p><The script type="calendar. Js & gt;" </script> <br/>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br/><script <span style="color: # FF0000;"> SRC </span>="calendar. Js & gt;" </script><p class="article - content rp"> CodePudding user response: </p>1/f, <fieldset> <legend> reference jio's reply: <legend> <blockquote> & lt; The script type="calendar. Js & gt;" </script> <br/>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- <br/><script <span style="color: # FF0000;"> SRC </span>="calendar. Js & gt;" </script> </blockquote> <fieldset> <br/>Bosses are cheap, is the same,<p class="article - content rp"> CodePudding user response: </p>Probability is the wrong path<p class="article - content rp"> CodePudding user response: </p><The script type="calendar. Js & gt;" </script> Do you have in this calendar. Js on that path <br/>If under the js to & lt; The script type="js/calendar. Js & gt;" </script><p class="article - content rp"> CodePudding user response: </p><script SRC="https://bbs.csdn.net/topics/js/calendar.js" & gt; </script><p class="article - content rp"> CodePudding user response: </p>HTML file and js file is not a directory, there is something wrong with the reference<p class="article - content rp"> CodePudding user response: </p>Try in a directory </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/5365.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/5365.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/5364.html'>Google browser to vue will appear my Google browser will be this: Failed to load the resource: net:</a></div> <div class="detail-arr-right">Next:<a href='/frontend/5366.html'>Display box does not display the data returned, bosses support, genuflect is begged under this code</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>