Class is not defined onClick event
问题 I use the new class syntax for JS. When I press a button, I want to call a method from a class. To archieve this, I set this method static. class NoteController { // The controller class constructor() { // Initialization // ... } static CreateNote() { // The method to call - static // .... } } <!DOCTYPE html> <html> <head> // .... <script src="NoteController.js"></script> // Link the js file to the html file </head> <body> // .... <button type="button" id="btnCreateNote" onclick=