Saltar a contenido

Recetas HTML

Página redirección

<!DOCTYPE HTML>

<meta charset="UTF-8">
<meta http-equiv="refresh" content="0; url=http://rhernando.net">

<script>
  window.location.href = "http://rhernando.net"
</script>

<title>Page Redirection</title>

If you are not redirected automatically, follow the <a href='http://rhernando.net'>link to rhernando</a>

Obligar a elegir una opción en un combo (no permitir dejarlo en “Seleccione una opción”)

<!-- Struts: obligar a elegir una opción en un combo (no permitir dejarlo en "Seleccione una opción") -->
<html:select property="amb_id" styleClass="textoSinBorde"
onchange="habilitarCombos();"
value="<%=InterfaceSolicitudesFOP.CONST_TIPO_AMBITO_TERRITORIAL%>"> 

<html:option value="" disabled="true"> <!--AQUÍ-->
</html:option>
<html:options collection="<%= InterfaceTV.DEFCOD_TIPO_AMBITO %>"
property="valVal" labelProperty="valDesAbr"/>
</html:select>

Iframe a tamaño completo

<!-- Iframe a tamaño completo -->
<iframe id='iframe2' src="url.com" frameborder="0" 
        style="overflow: hidden; height: 100%; width: 100%; position: absolute;" 
        height="100%" width="100%">
</iframe>

Cambiar el cursor a una mano cuando se pasa sobre un objeto

<!-- Cambiar el cursor a una mano cuando se pasa sobre un objeto -->
style="cursor.pointer"

Que explorer no muestre la página con vista de compatibilidad

En el head, hay que poner esta línea justo debajo del <title>:

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

En el caso de una aplicación JSF con primefaces es necesario añadir en la cabecera:

<f:facet name="first">
    <meta http-equiv="X-UA-Compatible" content="E=Edge" /> 
</f:facet>

ya que sino primefaces cargaría primero sus recursos y ya no funcionaría correctamente.


Última actualización: August 15, 2021