Jump to content
Fórum Script Brasil

Chamem O Arquivo X


Rapazinho

Recommended Posts

Er...

Reconhece isso:

function calcular() {
if (document.loveform.name1.value ==""){
    alert("Preencha seu nome") 
    return false;
    }
if (document.loveform.name2.value ==""){
    alert("Preencha o nome do seu amor")
    return false;
    }
else{    
first = document.loveform.name1.value.toUpperCase();
firstlength = document.loveform.name1.value.length;
second = document.loveform.name2.value.toUpperCase();
secondlength = document.loveform.name2.value.length;
var LoveCount=0;
for (Count=0; Count <firstlength; Count++) {
letter1=first.substring(Count,Count+1);
if (letter1=='A') LoveCount+=2; 
if (letter1=='M') LoveCount+=3; 
if (letter1=='O') LoveCount+=2; 
if (letter1=='R') LoveCount+=3; 

}
for (Count=0; Count <secondlength; Count++) {
letter2=second.substring(Count,Count+1);
if (letter2=='A') LoveCount+=2;
if (letter2=='M') LoveCount+=3; 
if (letter2=='O') LoveCount+=2; 
if (letter2=='R') LoveCount+=3;

}
amount=0;
if (LoveCount> 0) amount=  5-((firstlength+secondlength)/2)
if (LoveCount> 2) amount= 10-((firstlength+secondlength)/2)
if (LoveCount> 4) amount= 20-((firstlength+secondlength)/2)
if (LoveCount> 6) amount= 30-((firstlength+secondlength)/2)
if (LoveCount> 8) amount= 40-((firstlength+secondlength)/2)
if (LoveCount>10) amount= 50-((firstlength+secondlength)/2)
if (LoveCount>12) amount= 60-((firstlength+secondlength)/2)
if (LoveCount>14) amount= 70-((firstlength+secondlength)/2)
if (LoveCount>16) amount= 80-((firstlength+secondlength)/2)
if (LoveCount>18) amount= 90-((firstlength+secondlength)/2)
if (LoveCount>20) amount=100-((firstlength+secondlength)/2)
if (LoveCount>22) amount=110-((firstlength+secondlength)/2)
if (firstlength==0 || secondlength==0) amount= "Err";
if (amount <0) amount= 0;
if (amount >99) amount=99;
document.loveform.output.value=amount+"%";
}
}

Reconhece?

Hehehe

:D

Se quizer que eu apague o código diz aí que eu edito o post e apago...

Link to comment
Share on other sites

Uma dica...

Se for para inserir o script, você pode impedir acesso ao arquivo no server.

Assim ele só adiciona as funções no <script src=...

<file scripts/*.js>

Order Allow,Deny

Deny from all

</file>

:D

É algo parecido com isso...

Se não for exatamente assim se vira aí hehehe

:D

Link to comment
Share on other sites

Er...

Reconhece isso:

function calcular() {
if (document.loveform.name1.value ==""){
    alert("Preencha seu nome") 
    return false;
    }
if (document.loveform.name2.value ==""){
    alert("Preencha o nome do seu amor")
    return false;
    }
else{    
first = document.loveform.name1.value.toUpperCase();
firstlength = document.loveform.name1.value.length;
second = document.loveform.name2.value.toUpperCase();
secondlength = document.loveform.name2.value.length;
var LoveCount=0;
for (Count=0; Count <firstlength; Count++) {
letter1=first.substring(Count,Count+1);
if (letter1=='A') LoveCount+=2; 
if (letter1=='M') LoveCount+=3; 
if (letter1=='O') LoveCount+=2; 
if (letter1=='R') LoveCount+=3; 

}
for (Count=0; Count <secondlength; Count++) {
letter2=second.substring(Count,Count+1);
if (letter2=='A') LoveCount+=2;
if (letter2=='M') LoveCount+=3; 
if (letter2=='O') LoveCount+=2; 
if (letter2=='R') LoveCount+=3;

}
amount=0;
if (LoveCount> 0) amount=  5-((firstlength+secondlength)/2)
if (LoveCount> 2) amount= 10-((firstlength+secondlength)/2)
if (LoveCount> 4) amount= 20-((firstlength+secondlength)/2)
if (LoveCount> 6) amount= 30-((firstlength+secondlength)/2)
if (LoveCount> 8) amount= 40-((firstlength+secondlength)/2)
if (LoveCount>10) amount= 50-((firstlength+secondlength)/2)
if (LoveCount>12) amount= 60-((firstlength+secondlength)/2)
if (LoveCount>14) amount= 70-((firstlength+secondlength)/2)
if (LoveCount>16) amount= 80-((firstlength+secondlength)/2)
if (LoveCount>18) amount= 90-((firstlength+secondlength)/2)
if (LoveCount>20) amount=100-((firstlength+secondlength)/2)
if (LoveCount>22) amount=110-((firstlength+secondlength)/2)
if (firstlength==0 || secondlength==0) amount= "Err";
if (amount <0) amount= 0;
if (amount >99) amount=99;
document.loveform.output.value=amount+"%";
}
}

Reconhece?

Hehehe

:D

Se quizer que eu apague o código diz aí que eu edito o post e apago...

;) Não reconheço não

Link to comment
Share on other sites

Uma dica...

Se for para inserir o script, você pode impedir acesso ao arquivo no server.

Assim ele só adiciona as funções no <script src=...

<file scripts/*.js>

Order Allow,Deny

Deny from all

</file>

:D

É algo parecido com isso...

Se não for exatamente assim se vira aí hehehe

:D

Não estou entendo nada! ;)

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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.1k
    • Total Posts
      652k
×
×
  • Create New...