最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Downloading js script code from a url - Stack Overflow

programmeradmin5浏览0评论

I have a code that loads a JS script from a URL and put it in my website. I don't want to load the script from a URL because its depends on the URL and when the script in this URL is not working, the script in my website will not work too. What I want to do is to download the script code and save him in the FTP as a JS file, and then to load the script from this file and not from a URL. How do i download the script code? Here is the code that I have right now:

<script src=".js"></script>
<script>SO.load({"lang":"en","dir":"LTR","cookieOptions":{"domain":".trbinaryoptions"},"packages":{"Clock":{},"Balance":{},"RegularPlatform":{"settings":{"selector":"#so-trading"}}}});</script>

I have a code that loads a JS script from a URL and put it in my website. I don't want to load the script from a URL because its depends on the URL and when the script in this URL is not working, the script in my website will not work too. What I want to do is to download the script code and save him in the FTP as a JS file, and then to load the script from this file and not from a URL. How do i download the script code? Here is the code that I have right now:

<script src="https://spotplatform.trbinaryoptions./SpotOptionPlugin.js"></script>
<script>SO.load({"lang":"en","dir":"LTR","cookieOptions":{"domain":".trbinaryoptions."},"packages":{"Clock":{},"Balance":{},"RegularPlatform":{"settings":{"selector":"#so-trading"}}}});</script>
Share Improve this question edited Jul 21, 2016 at 9:23 sebaferreras 44.7k11 gold badges119 silver badges137 bronze badges asked Jul 21, 2016 at 8:42 elironeliron 111 gold badge1 silver badge5 bronze badges 2
  • open the Js script link and press ctrl+s i.e save it. Save it by any desired name and then copy it your project folder and then include it in your project files where you have included other files like jquery and css. – Deepak Singh Commented Jul 21, 2016 at 8:45
  • Thanks first for your help!. When I press ctrl + s its save the all page. and I want only the script. – eliron Commented Jul 21, 2016 at 8:56
Add a ment  | 

1 Answer 1

Reset to default 4

Open the script from the browser and save the file by Pressing Ctrl + S. That is all you need to do.

发布评论

评论列表(0)

  1. 暂无评论