Html canvas getContext() error

Browser console show error in getContext() .Please help me.

I would suggest to change Id from paintbox to canvas otherwise you can refer to this link : https://stackoverflow.com/questions/30430396/canvas-getcontext2d-error for more solutions

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

I change the id .But it show again same error.

Can you share your html code?

Please solve my problem