vue项目中使用远程js 阳光穿透心脏的1/2处 2024-04-17 15:42 12阅读 0赞 在vue项目中使用远程js(没有export default \{\}),在index.html中使用script标签引入。 <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>title</title> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> </head> <body> <script src="http://xxxxxx/js/jwplayer/jwplayer.js"></script> <div id="app"></div> <script src="/xxxxx/dist/build.js"></script> </body> </html> 在需要使用的地方可直接使用其中的方法 let thePlayer = jwplayer("videodiv") thePlayer.setup({ primary: "flash", autostart: true, playlist: "http://xxx.mp4", height: 520, width: 980, }) 像是写了废话,,,ԾㅂԾ,,,但是当时真的饶了个大弯。。。
还没有评论,来说两句吧...