if I have an js file with an function and parameters.
ex:
const renderCar = (param1, param2) => {
//do something
}
renderCar ();
How do I acces it from an html file??
Please does anyone know?
if I have an js file with an function and parameters.
ex:
const renderCar = (param1, param2) => {
//do something
}
renderCar ();
How do I acces it from an html file??
Please does anyone know?
?
Maybe Iām missing something? But import/include the file and then call the function?
create HTML element <div id='katorymnd'></div>
in you html file body
Then update you js file renderCar();
to $('#katorymnd').text(renderCar());
now reload your page
The value of renderCar();
will display on your Html page at <div id='katorymnd'></div>
Remember to add a jquery library <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
in the head tag of your html page.