Function call of other script through button tag functionality in html

Hi I want to call a function of other script with button tag through HTML .but once I call they show me an error which is function is not defined. I do work in classes. So how can I access function .Thanks. Share with me example if exist :slight_smile:

export your function and import it

1 Like

thanks for the quick response but i already export it

shouldn’t you add it to your importmap?

Already checked but not working

This is javascript related. try moving your a.js in the head section

here is more info on the subject: How to call JavaScript function in html - javatpoint

1 Like