網際內容管理系統在精密機械教學與研究上的應用

  • Home
    • Site Map
    • reveal
    • blog
  • About
  • 主機設定
    • Windows 10
      • Win 網站簽章
      • Win Oauth2
      • Oauth2 原理
      • Nginx
    • Ubuntu設定
      • Ubuntu 簽章
      • 配置 uwsgi
      • xrdp
  • fossiloauth
    • foauth_config
  • fossilapp
  • Fossil
  • 專題報告
  • Reference
    • Flutter
      • Flutter ref
    • discourse
      • 操作管理
    • cd2020pj1
      • Oauth2
    • Network
    • Ref
      • LaTeX
      • Automatic Control
      • 參考步驟
      • ebook1
      • Project
      • Ref2
      • Bond Graphs
      • KMOLBrowser
      • Glowscript
      • Rapydscript
      • Atoms
      • Samples
      • RLearning
      • Ebooks
      • Feedback
      • CMSiMDE
      • Git
      • Windows
      • Ubuntu
      • Heorku
      • Certbot
Glowscript << Previous Next >> Atoms

Rapydscript

Test embedded RapydScript

Source Codes:

<h4>Test embedded RapydScript</h4>
<script src="https://sw.kovidgoyal.net/rapydscript/repl/rapydscript.js"></script>
<script>// <![CDATA[
var compiler = RapydScript.create_embedded_compiler();
var js = compiler.compile(`
def hello_world():
    sum=0
    for i in range(11):
        sum=sum+i
    print(sum)
    alert("from 1 add to 10 is :" + str(sum))`);
function mySum() {
    document.body.textContent = js;
    eval(js);
    eval('hello_world()');
};
// ]]></script>
<p><button onclick="mySum()">Add from 1 to 10</button></p>


Glowscript << Previous Next >> Atoms

Copyright © All rights reserved | This template is made with by Colorlib