Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

246
Views
¿Cómo llamar a una función en un archivo HTML desde el módulo JS, es decir, tipo = módulo?

Estoy trabajando en un proyecto web integrado con la autenticación de base de fuego. Así que he creado un index.js como:

:--index.js

 import { } from "test.js"; function hello(){ alert("great!!"); }

:--index.html

 <!DOCTYPE html> <html> <head> <title>Title</title> <script type="module" src="index.js"></script> </head> <body> <button onclick="hello()" id="click">Click here</button> </body> </html>

Arriba está mi código cada vez que trato de llamar a la función a través de mí, un error dice:

hola funcion no definida

¿Me pueden ayudar a llamar a una función cuando hay type=module?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!