Javascript code _ javascript tips

Source: Internet
Author: User
This article mainly introduces how to change the background color of a webpage by sliding the mouse over a link in Javascript. It involves how to dynamically modify the attributes of a page element in JS response to a mouse event. It has some reference value, for more information about how to change the background color of a webpage, see examples in this article. We will share this with you for your reference. The details are as follows:

This little special effect is very good. You can use a link to change the background color of the webpage. If you place your mouse over the link text, the background of the webpage will change accordingly. If you want to make your homepage more personalized, this code can be used. In fact, you can modify the code and place it with the mouse and place the text to switch the style sheet. This will change the style of the entire webpage. Is it very practical?

The running effect is as follows:

The Online Demo address is as follows:

Http://demo.jb51.net/js/2015/js-mouse-over-link-cha-bgcolor-demo/

The Code is as follows:

Hover the mouse over the link to change the webpage background color

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.