Hola
pabloe9k
Pregunto: y tienes que hacerlo con javascript...?
Puedes usar la sencilla regla de enlaces (en este caso un falso enlace) de css:
Código HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Subrayar onmouseover -falso enlace-</title>
<style type="text/css">
a {
text-decoration: none;
color: #000;
}
a:hover {
text-decoration: underline;
color: #000;
}
</style>
</head>
<body>
<p><a href="#">Texto que parecerá subrayado al colocar el cursor</a></p>
</body>
</html>
Saludos