Ver Mensaje Individual
  #5 (permalink)  
Antiguo 18/01/2013, 21:09
Avatar de emprear
emprear
Colaborador
 
Fecha de Ingreso: junio-2007
Ubicación: me mudé
Mensajes: 8.388
Antigüedad: 16 años, 10 meses
Puntos: 1567
Respuesta: Desactivar todos los elementos en un pagina

un poco confusa la explicación, pero supongo que lo que querés es esto

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2.    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  5.     <title>Overlay</title>
  6. <style type="text/css">
  7. /*<![CDATA[*/
  8. html,body{
  9. height: 100%;
  10. margin: 0;
  11. padding: 0;
  12. border: none;
  13. }
  14. #ocultar{
  15. display: none;
  16. position:fixed;
  17. background:#000;
  18. width: 100%;
  19. height: 100%;
  20. opacity: 0.8;
  21. margin: 0;
  22. padding: 0;
  23. border: none;
  24. top:0;
  25. left:0;
  26. z-index: 999;
  27. text-align: center;
  28. padding-top: 200px;
  29. overflow:hidden;
  30. }
  31.  
  32. #cerrar{
  33. background: red;
  34. color: #FFF;
  35. border: solid red 2px;
  36. border-radius: 5px;
  37. position: absolute;
  38. z-index: 1000;
  39. text-align: center;
  40. cursor: pointer;
  41. width: 100px;
  42. padding: 8px;
  43. top: 40%;
  44. left: 50%;
  45. margin-left: -50px;
  46. }
  47.  
  48. /*]]>*/
  49.  
  50. <script type="text/javascript">
  51. //<![CDATA[
  52.  
  53. function ocultar(){
  54. document.getElementById('ocultar').style.display ="block";
  55. }
  56. function desactivar(){
  57. document.getElementById('hola').disabled = true;
  58. }
  59. //]]>
  60.  
  61. </head>
  62. <div id="ocultar"><div onclick="this.parentNode.style.display ='none';" id="cerrar">cerrar</div></div>
  63. <button onclick="ocultar();">ocultar todo</button>
  64. <h1>xxxx</h1>
  65. <h2>xxxxx</h2>
  66. <button onclick="desactivar()">alerta</button>
  67. <form action="#">
  68. <input type="text" value="hola" name="hola" id="hola" />
  69. </form>
  70. </body>
  71. </html>

saludos
__________________
La voz de las antenas va, sustituyendo a Dios.
Cuando finalice la mutación, nueva edad media habrá
S.R.

Última edición por emprear; 19/01/2013 a las 12:43