I have uploaded a file saved in .js format. How I can place it with my html index page? Kindly help me.
The best practise is include tag SCRIPT into HEAD tag in HTML structure. Here is an example: <html> <head> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> </head> <body> body here... </body> </html> Code (markup): - attribute type defines that in the file is javascript code - src is relative path /absolute URL to your js file at webhosting
Hi Jan Novak , thanks for your response. I need the script should be located in a particular position on the index file.If I am placing the include tag on the body section , would be OK. If I am copy paste the code on the body, it will work. But I want the updates in the .js file itself. So there is no need to go to the index file to edit the data.
I don't have the answer but try stackoverflow.com - I love this site for help getting to the bottom of a technical issue. Good luck!
Yes, this is possible too. You can "position" SCRIPT tag everywhere you want. If you don't see fresh results, try CTRL+F5 in browser to reload fresh sources from server. If you don't modify index file, it is a chance that browser load old .js file from browser cache. Please explain more your problem, add source code and expected results to help you more.
The JS file type is primarily associated with JavaScript. The files are generally text files. Also, This file type can become infected and should be anxiously scanned if anyone sends you a book with this extension.
Include of the JavaScript in the hard of the document like Jan Novak has posted will work pretty well for what you need.