Sign in to follow this  

[web] How to call javascript functions when it is in a .js file?

Recommended Posts

Hi, in my page I want to call a javascript function which resides in a .js file, from some <script> tags But the doAlert() can't be run from inside the script tags below for some reason. Any idea on how to do that?
function doAlert() {

<script type="text/javascript" src="script.js"></script>
<script type="text/javascript">doAlert();</script>


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this