This article mainly introduces the method of content transformation after javascript mouse is placed. The example analyzes the related skills of javascript to implement tab switching, which has some reference value, for more information, see the example in this article. Share it with you for your reference. The details are as follows:
This is a common menu effect on the Internet. After you place the mouse on it, the corresponding content will be switched and the layout of the text will be displayed. Technically, JavaScript and CSS are used together. In the Javascript part of the code, you can extract it and save it as a JS file, and then introduce it to the page, this simplifies the homepage code. This effect is normal in ie, Firefox, and other browsers.
Shows the running effect:
The Code is as follows:
Place the cursor and switch the following content
- International Affairs
- Exquisite Wallpaper
- Power relations
- European and American customs
- European and American customs
Script function $ _ class (name) {var elements = document. getElementsByTagName ("*"); for (s = 0; s
I hope this article will help you design javascript programs.