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

Write 'friendly' 'Javascript' code as much as possible_Basic knowledge

WBOY
Release: 2016-05-16 19:21:54
Original
998 people have browsed it

When the robot of Search Engine searches, for the type, the friendliness of "text" such as text/html is the highest (except text/xml at this stage), while the friendliness of text/javascript is not ideal. If the robot still If you want to judge DHTML code, the complexity is also high, and it is not worth it

Therefore, when programming DHTML, if you want to improve the friendliness of the code. The better method is to "simplify the DHTML code into code without HTML as much as possible". How to understand this sentence?

e.g:
A javascript menu.
Method 1. Use conventional programming methods: