Home > front end >  A beginner, a great god, please help to see how to use js to revise the video tag SRC path
A beginner, a great god, please help to see how to use js to revise the video tag SRC path

Time:12-04

Please help see why can't click on the button switch video playback of SRC path, the code is as follows:


<meta HTTP - equiv="content-type" Content="text/HTML. Charset=gb2312 "/& gt;
No title documents & lt;/title> <br/></head> <br/><body> <br/><Input type="button" value="https://bbs.csdn.net/topics/button" onclick="onl3 ()" & gt; <br/><Div> <br/><Embed SRC="https://bbs.csdn.net/topics/shiping1.swf" width="990" height="620" id="id" & gt; </embed> <br/></div> <br/></body> <br/><The script type="text/javascript" & gt; <br/>The function onl3 () {<br/>Document. The getElementById (" id "). The SRC="https://bbs.csdn.net/topics/shiping2.swf"; <br/>} <br/></script> <br/></html> <br/><img SRC="https://img.codepudding.com/202012/174372040606191.jpg" Alt=""/> <br/>Under the default video addresses for the same level of shiping1. SWF, want to pass the js method modified into shiping2 under the same level. The SWF, click on the button, however, does not have any change, please help to find out what is going on, thank you,<p class="article - content rp"> CodePudding user response: </p><The script type="text/javascript" & gt; <br/>The function onl3 () {<br/>Alert (document. GetElementById (" id "). The SRC); <br/>//the document. The getElementById (" id "). The SRC="https://bbs.csdn.net/topics/shiping2.swf"; <br/>} <br/></script> <br/><br/>Test video tag for SRC can be normal access to, the following screenshots: <img SRC="https://img.codepudding.com/202012/174372040606192.jpg" Alt=""/> </div> <div class="th_page th_page_color"></div> <div class="umCopyright"> <p>Page link:<a href="/frontend/91969.html" target="_blank" style="color:#999">https//www.codepudding.com/frontend/91969.html</a></p> </div> <div class="detail-arr"> <div class="detail-arr-left">Prev:<a href='/frontend/91968.html'>Javascript introduction with the necessary knowledge</a></div> <div class="detail-arr-right">Next:<a href='/frontend/91970.html'>How to use observables JSON data obtained</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>