As a very simple example, using that abacus you linked to, you could create a file called abacus.html and put this as the content:
<html>
<head>
<title>Abacus</title>
<script type="text/javascript" src="//www.mathematik.uni-marburg.de/~thormae/lectures/ti1/code/abacus/abacus.js"></script>
</head>
<body>
<div id="myAbacus"></div>
<script>
var abacus = new Abacus("myAbacus", 0);
abacus.init();
</script>
</body>
</html>
Then if you upload that to your course as a file resource, it should display the HTML and let the students mess with the abacus.
Or you could upload a zip file with the HTML file and the javascript file, so you aren't relying on linking to that other website.
Or you could convert it to a SCORM package.