0
Canvas coding: contains java elements?
<html> <head></head> <body> <canvas id="canvas1" width="400" height="300"></canvas> <script> var can = document.getElementById("canvas1"); var ctx = can.getContext("2d"); </script> </body> </html> Is the var section part of java? Doesn't ring a bell in the HTML part of my brain. 😕
7 Respostas
+ 6
Msizi inside the script tag is "javascript" its getting the canvas element from the html document you need javascript to draw on the canvas 😉👍
+ 7
Java is not JavaScript,
and Ham is not hamster. 🤣😂
+ 5
No, this is the JavaScript code but don't confuse with Java because the 2 program languages is different.
+ 4
lol,that is JavaScript,not java,any code enclosed within a script tag is JavaScript
+ 3
Okay you lot. Thank you. Sorry I wrote java instead of JavaScript. An honest mistake. Your responses, nonetheless, have made my day. It's a pity I didn't get such feedback from my Python-related questions.
+ 3
Msizi your very welcome 😉 were more then happy to help you with your questions,
If you didnt get much response to your python question please use the search bar in Q&A section for similar questions asked,
If no joy copy your old post and repost it to put it at the top of the page for people to see, make sure you delete the old post to prevent duplicate posts 😉.
+ 1
JavaScript it is. Not java