How is the . js extension file that is used by the browser to open web pages created?

Asked

Viewed 2,739 times

1

How is created the . js extension file that is used by the browser in opening web pages?

I’m studying a site already created to understand the operating system of the sites. In the archives of this site, when saving the complete web page, I can find some . js files, and would like to understand how it is created. Can someone help me with that?

Second question: What is the language name of this file?

Third question: This file can be created with Dreamweaver?

  • 1. With a text editor (??); 2. Javascript; 3. Yes

1 answer

2


JS is the Javascript extension

And yes you can create JS files using any text editor (Dreamweaver, Sublime, Atom, VIM, Notepad, etc.)

And for the files . JS to be called on a page the simplest way is for you to create a file . JS example: js file.

And then in your index.html you can call it that way here

<script src="arquivo.js"></script>

And then your html looks something like

<!DOCTYPE html>
<html>
    <head>
        <script src="arquivo.js"></script>
    </head>
    <body> 
        <h1>Oi Mundo</h1>
    </body>
</html>

NOTE: Just remember that for this to work your.js file and your index.html must be in the root of the same folder.

  • So Vinicius, thank you for your reply.

  • Calm any doubt just send =] #Keepcoding

  • Could you point me somewhere that I can learn the language contained in the . js files? Because I have basic knowledge of html, css and also programming in java, but I’ve never seen anything like this language. Here is a brief excerpt of the text contained in a file . js: ! Function(c,p){"Object"==typeof module&&"Object"==typeof module.Exports? module.Exports=c.Document? p(c,! 0):Function(c) {if(! c.Document)thro w Error("jQuery requires a window with a Document");Return p(c)}:p(c)}

  • A good place to start I think it may be the very training that google is releasing, completely new and innovative: https://google.dev/u/new

Browser other questions tagged

You are not signed in. Login or sign up in order to post.