How To Define ES6 Javascript Module And Call Module Exported Function In Html Code Correctly

I have a js file in my example project. And I define a js module function and a variable in the js file source code that uses the ES6 syntax. But when I want to use the module function and variable in an Html file, it throws some errors. This article will tell you how […]

How To Define ES6 Javascript Module And Call Module Exported Function In Html Code Correctly Read More »

How To Fix Javascript Uncaught SyntaxError: Unexpected token ‘export’ & Uncaught SyntaxError: Cannot use import statement outside a module

When I include an external javascript file into my Html file, I meet the error messages Uncaught SyntaxError: Unexpected token ‘export’ & Uncaught SyntaxError: Cannot use import statement outside a module. This article will tell you how to fix these 2 errors.

How To Fix Javascript Uncaught SyntaxError: Unexpected token ‘export’ & Uncaught SyntaxError: Cannot use import statement outside a module Read More »

How To Fix Uncaught DOMException: Failed To Execute ‘toDataURL’ On ‘HTMLCanvasElement’: Tainted Canvases May Not Be Exported

Recently when I use Html5 canvas to capture video screenshots and save the screenshots to an image, it through the error Uncaught DOMException: Failed to execute ‘toDataURL’ on ‘HTMLCanvasElement’: Tainted canvases may not be exported. This article will tell you how to fix it.

How To Fix Uncaught DOMException: Failed To Execute ‘toDataURL’ On ‘HTMLCanvasElement’: Tainted Canvases May Not Be Exported Read More »

How To Disable Enable Button After One Click In Javascript

If you want to disable/enable a button after clicking the button in JavaScript, you can use the button element’s disabled attribute. When you set the button’s disabled attribute’s value to true, then the button will be disabled. When you set the button’s disabled attribute’s value to false, then the button will be enabled. This article will

How To Disable Enable Button After One Click In Javascript Read More »