Name: Anonymous 2020-04-06 1:08
Because I've never properly learned it. What are you going to do? Bully me twice?
document.write()
IBM® SDK for Node.js - z/OS®, at no license charge, and optional paid support, provides a secure, module-driven, highly scalable approach to accelerate digital transformation on IBM Z. By coding in the popular JavaScript language, Node.js allows enterprise clients to tap into the wealth of JavaScript developer talent and resources.
With applications typically developed in a shorter time and with fewer lines of code, Node.js can enable enterprise clients to efficiently augment existing IBM Z® application stacks to provide a timely response to customer requirements driven by digital transformation.
<script type="text/javascript"><!--
alert('hello this is Javascript!');
//-->
</script>
<html>
<body>
<canvas id="mycanvas" width="512" height="512"></canvas>
<script>
mcanv = document.getElementById("mycanvas");
ctx = mcanv.getContext("2d");
function circle(context, cx, cy, r){
context.beginPath(); context.arc(cx, cy, r, 0, 2 * Math.PI, false);
context.fillStyle = 'green'; context.fill();
context.lineWidth = 0; context.strokeStyle = '#003300'; context.stroke();
}
function clear(context,canvas){
context.clearRect(0, 0, canvas.width, canvas.height);
}
function load(){
x=0;y=0;t=0;w=2;r=75;v=20;
}
function update(dt){
t=t+dt;
x=100+v*t/1000+r*Math.cos(w*t/1000);
y=256+r*Math.sin(w*t/1000);
}
function draw(context){
//clear(context, mcanv);
circle(context, x, y, 1);
}
lasttime=new Date().getTime();
(function () {
load();
setInterval(function(){
thistime=new Date().getTime();
update(thistime-lasttime);
draw(ctx);//frames[frame%2]);
lasttime=thistime;}, 16);
})();
</script>
</body>
</html>