How to make a mouse-sensing animated menu

Source: Internet
Author: User
Tags eval
Menu | sensor | Mouse Many netizens ask: "Mouse move Up will brighten menu is how to make?" In fact, this is the use of two pictures alternately display the effect, the specific use of JavaScript scripting language implementation. Because it's a little more complicated, it needs to be explained carefully.
You want to make this effect, first of all to make the same size, different effects of the two pictures (first make a good one, then copy another one, and then make other effects, so you can ensure that the picture is fully consistent).
Then add the following JavaScript code to the <script language= "JavaScript" >
Author:alone ^_^;
date:08.26.98
Hide from Non-javascript Compatible browser
J=document.images;

if (j)

{
Button00=new Image (); Button00.src= "Http://www.webjx.com/htmldata/images/2.gif";
Button001=new Image (); Button001.src= "Http://www.webjx.com/htmldata/images/21.gif";
Button01=new Image (); Button01.src= "Http://www.webjx.com/htmldata/images/3.gif";
Button011=new Image (); Button011.src= "Http://www.webjx.com/htmldata/images/31.gif";
Button02=new Image (); Button02.src= "Http://www.webjx.com/htmldata/images/4.gif";
Button021=new Image (); Button021.src= "Http://www.webjx.com/htmldata/images/41.gif";
Button03=new Image (); Button03.src= "Http://www.webjx.com/htmldata/images/5.gif";
Button031=new Image (); Button031.src= "Http://www.webjx.com/htmldata/images/51.gif";
Button04=new Image (); Button04.src= "Http://www.webjx.com/htmldata/images/6.gif";
Button041=new Image (); Button041.src= "Http://www.webjx.com/htmldata/images/61.gif";
}

function Img_act (p)
{if (j) {on = eval (p + "1.src");
DOCUMENT[P].SRC = on;}
}

function Img_inact (p)
{if (j) {off = eval (p + ". src");
DOCUMENT[P].SRC = off;
}
}
--></script>

You can only change a statement like "Http://www.webjx.com/htmldata/images/2.gif" to your picture name and pathname, and no other changes. Then put the following code between <body></body>:
<table border= "0" width= "100%" cellspacing= "0" cellpadding= "0" >
<tr>
&LT;TD width= "100%" bgcolor= "#000000" ><p align= "center" ><a href= ". /frontpage.htm "></a></td>"
</tr>
<tr>
&LT;TD width= "100%" bgcolor= "#000000" ><p align= "center" ><a href= ". /photoshop.htm "></a></td>"
</tr>
<tr>
&LT;TD width= "100%" bgcolor= "#000000" ><p align= "center" ><a href= ". /javas.htm "></a></td>"
</tr>
<tr>
&LT;TD width= "100%" bgcolor= "#000000" ><p align= "center" ><a href= ". /cgi.htm "></a></td>"
</tr>
<tr>
&LT;TD width= "100%" bgcolor= "#000000" ><p align= "center" ><a href= ". /homepage.htm "></a></td>"
</tr>
</table>

Will resemble <a href= ". Change the/frontpage.htm> statement to the file name you want to link to; "Http://www.webjx.com/htmldata/images/6.gif", like the IMG src=, is changed to your picture name and pathname; similar to width= " 130 "height=" 25 "to your picture's width and height."

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.