I am trying to call innerHtml in JavaScript its working in the same file but not in the separate JavaScript JS file.
my working code is
<script type="text/javascript">
function my()
document.getElementById("abc").innerHTML="hello";
}
</script>
<div id="abc" onmouseover ="my()"> hi hw ru </div>
But if I invoke this method in separate JavaScript file its not working even I am giving the source path of the JavaScript file like
<script type="text/javascript" src="js/framemrq.js">
Missing the function keyword
<script type="text/javascript">
function my(){
// Your code here
}
</script>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With