Ir para conteúdo
Fórum Script Brasil
  • 0

Conteudo Dentro De Uma Variavel


Deividy

Pergunta

o código é esse

html+= "<script language='JavaScript' type='text/JavaScript'>";

html+= "//-->";

html+= "function Imagem(img)";

html+= "{";

html+= "foto1= new Image();";

html+= "foto1.src=(img);";

html+= "Controlla(img);";

html+= "}";

html+= "function Controlla(img)";

html+= "{";

html+= "if((foto1.width!=0)&&(foto1.height!=0))";

html+= "viewFoto(img);";

html+= "}";

html+= "else";

html+= "{";

html+= "funzione="Controlla("+img+")";";

html+= "intervallo=setTimeout(funzione,20);";

html+= "viewFoto(img);";

html+= "}";

html+= "}";

html+= "function viewFoto(img)";

html+= "{";

html+= "largh=foto1.width+20;";

html+= "altez=foto1.height+20;";

html+= "stringa="width="+largh+",height="+altez;";

html+= "finestra=window.open(img,"",stringa);";

html+= "}";

html+= "//-->";

html+= "</script>";

tenh ai tipo

html+= "funzione="Controlla("+img+")";";

não estou sabendo colcoar isso para mandar corretamente, alguém pode me ajudar?

Link para o comentário
Compartilhar em outros sites

2 respostass a esta questão

Posts Recomendados

  • 0

Num intendi muito bem a função do código, mas tentei dar um jeito no que achei que poderia estar errado. Se não funcionar com vc, posta ae!

html+= "<script language='JavaScript' type='text/JavaScript'>";
html+= "//-->";
html+= "function Imagem(img)";
html+= "{";
html+= "foto1= new Image();";
html+= "foto1.src=(img);";
html+= "Controlla(img);";
html+= "}";
html+= "function Controlla(img)";
html+= "{";
html+= "if((foto1.width!=0)&&(foto1.height!=0))";
html+= "viewFoto(img);";
html+= "}";
html+= "else";
html+= "{";
html+= "funzione="Controlla("+img+")";";
html+= "intervallo=setTimeout(funzione,20);";
html+= "viewFoto(img);";
html+= "}";
html+= "}";
html+= "function viewFoto(img)";
html+= "{";
html+= "largh=foto1.width+20;";
html+= "altez=foto1.height+20;";
html+= "stringa="width="+largh+",height="+altez;";
html+= "finestra=window.open(img,"",stringa);";
html+= "}";
html+= "//-->";
html+= "funzione="Controlla("+img+")";";
html+= </script>

falou.

Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.


  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...