Ver Mensaje Individual
  #9 (permalink)  
Antiguo 28/04/2011, 21:07
aviones_saltillo
 
Fecha de Ingreso: abril-2011
Ubicación: mexico
Mensajes: 3
Antigüedad: 13 años, 7 meses
Puntos: 0
Respuesta: Cambiar valores de un boton HTML javascript

Código Javascript:
Ver original
  1. <html><head><script type="text/javascript">
  2. function right(e) {
  3. if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
  4. alert("No puedes usar en boton derecho en esta pagina");
  5. return false;
  6. }
  7. else if (navigator.appName == 'Microsoft Internet Explorer' &&
  8. (event.button == 2 || event.button == 3)) {
  9. alert("No puedes usar el boton derecho en esta pagina.");
  10. return false;
  11. }
  12. return true;
  13. }
  14. document.onmousedown=right;
  15. if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  16. window.onmousedown=right;
  17. function disableselect(e){
  18. return false}
  19. function reEnable(){
  20. return true}
  21. document.onselectstart=new Function ("return false")
  22. if (window.sidebar){
  23. document.onmousedown=disableselect
  24. document.onclick=reEnable}
  25. function ironman(id){
  26. if (document.getElementById){
  27. var el = document.getElementById(id);
  28. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  29. function marca(id){
  30. if (document.getElementById){
  31. var el = document.getElementById(id);
  32. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  33. window.onload = function(){
  34. ironman('pelicula');}
  35. function ironmanII(id){
  36. if (document.getElementById){
  37. var el = document.getElementById(id);
  38. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  39. function marcab(id){
  40. if (document.getElementById){
  41. var el = document.getElementById(id);
  42. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  43. window.onload = function(){
  44. ironmanII('peliculaII');}
  45. function avatar(id){
  46. if (document.getElementById){
  47. var el = document.getElementById(id);
  48. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  49. function marcac(id){
  50. if (document.getElementById){
  51. var el = document.getElementById(id);
  52. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  53. window.onload = function(){
  54. avatar('peliculaIII');}
  55. function toystoryIII(id){
  56. if (document.getElementById){
  57. var el = document.getElementById(id);
  58. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  59. function marcad(id){
  60. if (document.getElementById){
  61. var el = document.getElementById(id);
  62. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  63. window.onload = function(){
  64. toystoryIII('peliculaIV');}
  65. function knightrider(id){
  66. if (document.getElementById){
  67. var el = document.getElementById(id);
  68. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  69. function marcae(id){
  70. if (document.getElementById){
  71. var el = document.getElementById(id);
  72. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  73. window.onload = function(){
  74. knightrider('peliculaV');}
  75. function tdat(id){
  76. if (document.getElementById){
  77. var el = document.getElementById(id);
  78. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  79. function marcaf(id){
  80. if (document.getElementById){
  81. var el = document.getElementById(id);
  82. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  83. window.onload = function(){
  84. tdat('peliculaVI');}
  85. function eddr(id){
  86. if (document.getElementById){
  87. var el = document.getElementById(id);
  88. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  89. function marcag(id){
  90. if (document.getElementById){
  91. var el = document.getElementById(id);
  92. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  93. window.onload = function(){
  94. eddr('peliculaVII');}
  95. function hola(id){
  96. if (document.getElementById){
  97. var el = document.getElementById(id);
  98. el.style.display = (el.style.display == 'none') ? 'block' : 'none'; }}
  99. window.onload = function(){
  100. hola('musik');}
  101. function mostrar(enla,etik) {
  102. obj = document.getElementById(etik);
  103. obj.style.visibility = (obj.style.visibility == 'hidden') ? 'visible' : 'hidden';}
  104. </script>
  105.  
  106. </head><body>
  107. <table background="IMG000008.jpg">
  108. <tbody><tr>
  109. <td>
  110. <fieldset><div align="center"><img src="signbot.gif" ></div>
  111.  
  112. <p><font color="White">tiempo restante</font></p><font color="White">
  113. <form name="Reloj">
  114. <input  type="text" size="7" name="tiempo" value="mm:hh:ss" title="Tiempo restante para
  115.  
  116. finalizar el día">
  117. <script language="JavaScript">
  118. <!--
  119. var tiempoAtras;
  120.  
  121. updateReloj();
  122. function updateReloj() {
  123. var tiempo = new Date();
  124. var hora = 23-tiempo.getHours();
  125. var minutos = 59-tiempo.getMinutes();
  126. var segundos = 59-tiempo.getSeconds();
  127.  
  128. tiempoAtras= (hora < 10) ? hora :hora;
  129. tiempoAtras+= ((minutos < 10) ? ":0" : ":") + minutos;
  130. tiempoAtras+= ((segundos < 10) ? ":0" : ":") + segundos;
  131.  
  132. document.Reloj.tiempo.value = tiempoAtras;
  133.  
  134. setTimeout("updateReloj()",1000);
  135. }
  136. //-->
  137. </script>
  138. <a onclick="hola('musik')"><input  type="button" value="Reproductor" ></a>
  139. <div id="musik">
  140. <embed src="smash.mp3" loop="30" autostart="true" volume="4" width="300" height="60"
  141.  
  142. controls="smallconsole"></div>
  143. </form>
  144.  
  145. <hr align="LEFT" size="1" width="200" color="White" noshade="">1
  146. <a style="cursor: pointer;" onmouseover="mostrar(this,'marca'); return false"
  147.  
  148. onmouseout="mostrar(this,'marca'); return false" onclick="ironman('pelicula');marca
  149.  
  150. ('marca')"><input type="button" value="Iron man"></a>
  151. <div id="marca" style="display: block; visibility: hidden; ">Ver pelicula</div>
  152. <div id="pelicula" style="display: none; ">
  153. </div>
  154. <hr align="LEFT" size="1" width="200" color="White" noshade=""> 2
  155. <a style="cursor: pointer;" onmouseover="mostrar(this,'marcab'); return false"
  156.  
  157. onmouseout="mostrar(this,'marcab'); return false" onclick="ironmanII('peliculaII');marcab
  158.  
  159. ('marcab')"><input type="button" value="Iron man 2"></a>
  160. <div id="marcab" style="visibility: hidden; ">Ver pelicula</div>
  161. <div id="peliculaII" style="display:none">
  162. <object width="1024" height="439">
  163. </div>
  164. <hr align="LEFT" size="1" width="200" color="White" noshade=""> 3
  165. <a style="cursor: pointer;" onmouseover="mostrar(this,'marcac'); return false"
  166.  
  167. onmouseout="mostrar(this,'marcac'); return false" onclick="avatar('peliculaIII');marcac
  168.  
  169. ('marcac')"><input type="button" value="Avatar"></a>
  170. <div id="marcac" style="display: block; visibility: hidden; ">Ver pelicula</div>
  171. <div id="peliculaIII" style="display: none; "></div>
  172. <hr align="LEFT" size="1" width="200" color="White" noshade=""> 4
  173. <a style="cursor: pointer;" onmouseover="mostrar(this,'marcad'); return false"
  174.  
  175. onmouseout="mostrar(this,'marcad'); return false" onclick="toystoryIII('peliculaIV');marcad
  176.  
  177. ('marcad')"><input type="button" value="Toy story 3"></a>
  178. <div id="marcad" style="display: block; visibility: hidden; ">Ver pelicula</div>
  179. <div id="peliculaIV" style="display: none; "></div>
  180. <hr align="LEFT" size="1" width="200" color="White" noshade=""> 5
  181. <a style="cursor: pointer;" onmouseover="mostrar(this,'marcae'); return false"
  182.  
  183. onmouseout="mostrar(this,'marcae'); return false" onclick="knightrider('peliculaV');marcae
  184.  
  185. ('marcae')"><input type="button" value="knight Rider"></a>
  186. <div id="marcae" style="visibility: hidden; ">Ver pelicula</div>
  187. <div id="peliculaV" style="display:none"></div>
  188. <hr align="LEFT" size="1" width="200" color="White" noshade="">6
  189. <a style="cursor: pointer;" onmouseover="mostrar(this,'marcaf'); return false"
  190.  
  191. onmouseout="mostrar(this,'marcaf'); return false" onclick="tdat('peliculaVI');marcaf
  192.  
  193. ('marcaf')"><input type="button" value="El dia despues de mañana"></a>
  194. <div id="marcaf" style="display: block; visibility: hidden; ">Ver pelicula</div>
  195. <div id="peliculaVI" style="display: none; "></object></div>
  196. <hr align="LEFT" size="1" width="200" color="White" noshade=""> 7
  197. <a style="cursor: pointer;" onmouseover="mostrar(this,'marcag'); return false"
  198.  
  199. onmouseout="mostrar(this,'marcag'); return false" onclick="eddr('peliculaVII');marcag
  200.  
  201. ('marcag')"><input type="button" value="El discurso del rey"></a>
  202. <div id="marcag" style="display: block; visibility: hidden; ">Ver pelicula</div>
  203. <div id="peliculaVII" style="display: none; "></div>
  204. </font></fieldset><font color="White">
  205. </font></td>
  206. </tr>
  207. </tbody></table>
  208. </body>
  209. </html>
perdon era esta la que quiero cambiar