Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function passar(img){
- var contador = 0;
- if (contador == 0){
- var aumentar = confirm("tem certeza que deseja aumentar a imagem?");
- if(aumentar == true && contador ==0){
- contador=contador+1;
- img.height=img.height*2;
- img.width=img.width*2;
- } else if (aumentar== true && contador==1){
- window.alert("Não é possivel aumentar mais");
- } else {
- var diminuir = confirm("tem certeza que deseja diminuir a imagem?");
- if ( diminuir==true && contador==1){
- contador=contador-1;
- img.height=img.height/2;
- img.width=img.width/2;
- } else if(diminuir == true && contador==0){
- window.alert("Não é possivel");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement