Thread: externally loading javascript ?
when use <script src......> load external javascript, not loading?
pgm1.js
this pgm3.htmlcode:<script language="javascript"> var mes="message goes here......" </script>
what problem?code:<html> <title> display</title> <head> <script src="/home/abhilash/pgm1.js"> </script> </head> <body> <script language="javascript"> document.write("<p>"+mes+"</p>"); </script> </body> </html>
pgm1.js
pgm3.htmlphp code:
var message = "message from javascript";
p.s. - <title> in wrong placephp code:
<script type="text/javascript">
document.write("<p>" + message + "</p>");
</script>
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk externally loading javascript ?
Ubuntu
Comments
Post a Comment