Is there a way of calling a function that exists in a HTML file from a .js file?
Something like this:
HTML file:
<script type="text/javascript" src="javaFile.js"></script>
<script 开发者_如何转开发type="text/javascript">
function doSomething() {
};
</script>
javaFile.JS file:
htmlFile.doSomething();
? Thanks :)
You can directly call doSomething();
精彩评论