Home > Web Front-end > JS Tutorial > body text

Detailed explanation of navigato object of JavaScript object

黄舟
Release: 2017-08-09 11:09:49
Original
1237 people have browsed it

Use a simple code demonstration to illustrate the commonly used properties and methods of the date object Date in JavaScript.

1. Open the text editor, create a new text document, and store it as a .html file, then create a new text document and store it as a .js file. The names of the two files can be arbitrary, but the suffixes must be .html and .js. Here, the Utilitied-1.html file is used to reference the Utilitied-1.js script for demonstration.

Detailed explanation of navigato object of JavaScript object


##2. Double-click to open the html file and proceed Code writing is mainly to implement references to js script files. The code is shown in the figure below, which is introduced in the <script></script> tag.

Detailed explanation of navigato object of JavaScript object

3. Then go back to the .js file and write the relevant code for the String object. Including properties, methods and other commonly used codes.

Simply use document.write() to output and see the effect. The code is shown below.

Detailed explanation of navigato object of JavaScript object

4. Then find the location of the .html file, right-click, open properties, find the path, and copy it. Then paste it into the browser to see the effect, as shown in the picture below.

Detailed explanation of navigato object of JavaScript object

5. Finally, you can use shortcut keys directly in editplus. Select the .html file and press ctrl+b to directly edit it in editplus. Demonstrate in the built-in browser. The effect is the same, as shown in the picture below.

Detailed explanation of navigato object of JavaScript object

6. It should be stated that this is to demonstrate the knowledge to be shared, so only the part of the .html file is given Code, as for how to change the background color, the code may be attached later.

The above is the detailed content of Detailed explanation of navigato object of JavaScript object. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template