Jump to content
Fórum Script Brasil
  • 0

Ajuda com JavaScript


José Gustavo

Question

Tenho o seguinte arquivo:

<html>
<head>
<title>Mudar de Fotos sem recarregar página</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8">

<script type="text/javascript" language="javascript">
function trocaFoto() {
    divFoto.innerHTML="<img src=\"http://i56.tinypic.com/ndn639.png\" border=\"0\" alt=\"Figura\" />";
}
function dexaFoto() {
    divFoto.innerHTML="<img src=\"http://i55.tinypic.com/18zuz7.png\" border=\"0\" alt=\"Figura\" />";
}
</script>

</head>
<body>

<div name="divFoto" id="divFoto"><img src="http://i51.tinypic.com/r761pv.png" border="0" alt="Figura" /></div>

<input type="button" value="Imagem 1" onClick="java script:dexaFoto();"></input>
<input type="button" value="Imagem 2" onClick="java script:trocaFoto();"></input>


</body>
</html>

E a pergunta é: Tem algum jeito de substituir as imagens por tabelas?

Edited by José Gustavo
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.2k
    • Total Posts
      652k
×
×
  • Create New...