搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

Learn More

Can I embed an external js file?

  • 1 回覆
  • 5 有這個問題
  • 30 次檢視
  • 最近回覆由 alanmoo

more options

I was trying to make a tutorial about how to make a GeoGebra webpage by embedding the JavaScript API provided by GeoGebra.

What I did was to include the following code in my index.html file:

<script src="http://www.geogebratube.org/scripts/deployggb.js"></script>

but it didn't work.

I have to copy the entire deployggb.js file, and make it a local one to make it work. See: https://d157rqmxrxj6ey.cloudfront.net/pegasusroe/38459/

Does Thimble support external js files?

I was trying to make a tutorial about how to make a GeoGebra webpage by embedding the JavaScript API provided by GeoGebra. What I did was to include the following code in my index.html file: <script src="http://www.geogebratube.org/scripts/deployggb.js"></script> but it didn't work. I have to copy the entire deployggb.js file, and make it a local one to make it work. See: https://d157rqmxrxj6ey.cloudfront.net/pegasusroe/38459/ Does Thimble support external js files?

被選擇的解決方法

Thimble does support external js files, but they have to be loaded securely. That means the server they're hosted on has to support https and the url used as the `src` needs to start with `https` as well.

從原來的回覆中察看解決方案 👍 3

所有回覆 (1)

more options

選擇的解決方法

Thimble does support external js files, but they have to be loaded securely. That means the server they're hosted on has to support https and the url used as the `src` needs to start with `https` as well.