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

231
Views
How to call JavaScript function from a .HTML file to a .JS file?

I've been working on a .js and .html file and in my .js file, I want to call to a function that's located in the .html file.

This is the function in the .html file that I want to be called to:

    <script>
        function themeChange4() {
            document.getElementById("theStyle").style = "";
        }
    </script>

This is where I want the function to be called to in my .js file:

add_icon_not_via_filesystem({
    title: "Vending Machine",
    icon: "Soda",
    open: themeChange4,
});
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

If I understood You want from HTML

  <script src="js.js"></script>
  <script>
  function themeChange4(){
     add_icon_not_via_filesystem(); 
  }
themeChange4();
 </script>

to call

function add_icon_not_via_filesystem(){
 alert('This');
 }
about 4 years ago · Juan Pablo Isaza Report
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!