When a user defines link text on a webpage, the prompted characters are displayed in blue and automatically added with a strip. Of course, not every user wants to set this way. How to change this setting to make it more personalized? This article provides a programming method for your reference.
Currently, the CCS technology greatly improves the production of web pages and the implementation of dynamic applications, improving the rigid HTML webpage display mode. The improvement of the link text display method can also be found in the CCS. We use this requirement to achieve dynamic display of link text: Generally, the link text is displayed in a dark red, when the mouse falls on the marked link text, the link text is displayed in red and automatically added with a horizontal line. When the mouse leaves the marked link text, the horizontal line is removed automatically to restore the original display mode.
The onmouseover and onmouseout statements can be used to process and move the mouse over the markup text and exit the markup text to respond to the execution. The user's setting requirements can be defined on these two statements to achieve the dynamic setting of the above link text, color can be used to define the character color, and textDecoration can be used to determine whether the character has a strip or not. The following is a program for HTML Custom dynamic link text display. Note that the environment for implementing this function is IE4.0.
<! -- Example of link text dynamic display in IE4.0 -->
<HTML>
<HEAD>
<TITLE> link text dynamic display
</TITLE>
</HEAD>
<BODY>
<CENTER>
<HR>
<A href = "http: // htmldata/2005-02-24/wuci.html" STYLE =
"Color: darkred; text-decoration: none"
ONMOUSEOVER = "this. style. color =
'Red'; this. style. textDecoration = 'underline '"
ONMOUSEOUT = "this. style. color =
'Darkred'; this. style. textDecoration = 'none' ">
GO HOME
</A>
<HR>
</CENTER>
</BODY>
</HTML>
<