ian0411
07-19-2008, 11:44 PM
Hi All,
I am new to the website design world. I really love it. But I have a problem about how to link my web page to a separate .js file.
In my web page, I have 5 links. The problem I have is to use Javascript to make a rollover type of effect (I know how to use CSS but my task is to make JavaScript work on this part). I want to change fonts to 14px and blue color when the mouse hovers. And change it back when the mouse out.
Here are my codes in the web page:
<li><a href="home.aspx" title="home">home</a></li>
<li><a href="contactinfo.aspx" title="contactinfo">contactinfo</a></li>
<li><a href="customerservice.aspx" title="customerservice">customerservice</a></li>
<li><a href="feedback.aspx" title="feedback">feedback</a></li>
<li><a href="myaccount.aspx" title="myaccount">myaccount</a></li>
Can anyone show me how to write a Javascript code into a separate file and make this work and what/where to add the code in my HTML web page? I really appreciate your help.
Thanks,
Ian
I am new to the website design world. I really love it. But I have a problem about how to link my web page to a separate .js file.
In my web page, I have 5 links. The problem I have is to use Javascript to make a rollover type of effect (I know how to use CSS but my task is to make JavaScript work on this part). I want to change fonts to 14px and blue color when the mouse hovers. And change it back when the mouse out.
Here are my codes in the web page:
<li><a href="home.aspx" title="home">home</a></li>
<li><a href="contactinfo.aspx" title="contactinfo">contactinfo</a></li>
<li><a href="customerservice.aspx" title="customerservice">customerservice</a></li>
<li><a href="feedback.aspx" title="feedback">feedback</a></li>
<li><a href="myaccount.aspx" title="myaccount">myaccount</a></li>
Can anyone show me how to write a Javascript code into a separate file and make this work and what/where to add the code in my HTML web page? I really appreciate your help.
Thanks,
Ian