CSS:
Código HTML:
#menucv1, #menucv2, #menucv3, #menucv4 { background-color: #7C95FD; font-family: "Roboto-Bold"; text-align: center; vertical-align: middle; position: relative; border: 1px solid #000; box-sizing: border-box; width: 25%; height: 30px; float: left; }
Código PHP:
if($_GET['valor'])
{
$valor = $_GET['valor'];
}
else
{
$valor = 1;
}
echo'
<script type="text/javascript">
var menucv = "menucv'.$valor.'";
alert(menucv);
document.getElementById(menucv).style.backgroundColor = "#5677FC";
document.getElementById(menucv).style.borderStyle = "inset";
alert("Adios");
</script>
';
Código HTML:
<div id="menucv1"><a href="cv.php?valor=1" target="contenedor">Experiencia Profesional</a></div> <div id="menucv2"><a href="cv.php?valor=2" target="contenedor">Estudios</a></div> <div id="menucv3"><a href="cv.php?valor=3" target="contenedor">Idiomas</a></div> <div id="menucv4"><a href="cv.php?valor=4" target="contenedor">Otros</a></div>
Saludos
bichomen