Ver Mensaje Individual
  #8 (permalink)  
Antiguo 28/04/2011, 20:57
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

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

esta funcion
Código Javascript:
Ver original
  1. <input id="Fmbtn" type="button" value=" >= " onclick="sig()" >
  2. <script type="text/javascript">
  3. function sig(){
  4.     var array = new Array(" >= ", " = ", " <= ", " > ", " < ");
  5.     for(i=0; i < array.length; i++){
  6.         if(document.getElementById('Fmbtn').value == array[i]){
  7.             var indice = (i + 1 == array.length) ? 0 : i + 1;
  8.             document.getElementById('Fmbtn').value = array[indice];
  9.             break;
  10.         }
  11.     }
  12. }
  13. </script>

para cambiar el boton de Reproductor a ver y ocultar pero no queda