ÖSSZEILLETEK?-NÉZD MEG!
2007.11.14. 11:42
<FONT size=1> <SCRIPT language=JavaScript></FONT> <P><FONT size=1>/*<BR>By Wee Family </FONT><A href="mailto:psweesam@singnet.com.sg"><FONT color=#ff7e00 size=1>psweesam@singnet.com.sg</FONT></A><BR><FONT size=1>Featured on JavaScript Kit (</FONT><A href="http://javascriptkit.com/"><FONT color=#ff7e00 size=1>http://javascriptkit.com</FONT></A><FONT size=1>)<BR>For this and over 400+ free scripts, visit </FONT><A href="http://javascriptkit.com/"><FONT color=#ff7e00 size=1>http://javascriptkit.com</FONT></A><BR><FONT size=1>*/</FONT></P> <P><FONT size=1>function calc() {<BR>first = document.loveform.name1.value.toUpperCase();<BR>firstlength = document.loveform.name1.value.length;<BR>second = document.loveform.name2.value.toUpperCase();<BR>secondlength = document.loveform.name2.value.length;<BR>var LoveCount=0;</FONT></P> <P><FONT size=1>for (Count=0; Count < firstlength; Count++) {</FONT></P> <P><FONT size=1></FONT> </P> <P><FONT size=1>letter1=first.substring(Count,Count+1);</FONT></P> <P><FONT size=1>if (letter1=='L') LoveCount+=2; <BR>if (letter1=='O') LoveCount+=2; <BR>if (letter1=='V') LoveCount+=2;<BR>if (letter1=='E') LoveCount+=2; <BR>if (letter1=='Y') LoveCount+=3; <BR>if (letter1=='O') LoveCount+=1; <BR>if (letter1=='U') LoveCount+=3;<BR>}</FONT></P> <P><BR><FONT size=1>for (Count=0; Count < secondlength; Count++) {<BR>letter2=second.substring(Count,Count+1);<BR>if (letter2=='L') LoveCount+=2;<BR>if (letter2=='O') LoveCount+=2; <BR>if (letter2=='V') LoveCount+=2; <BR>if (letter2=='E') LoveCount+=2;<BR>if (letter2=='Y') LoveCount+=3;<BR>if (letter2=='O') LoveCount+=1;<BR>if (letter2=='U') LoveCount+=3;<BR>}</FONT></P> <P><FONT size=1>amount=0;</FONT></P> <P><FONT size=1>if (LoveCount> 0) amount= 5-((firstlength+secondlength)/2)<BR>if (LoveCount> 2) amount= 10-((firstlength+secondlength)/2)<BR>if (LoveCount> 4) amount= 20-((firstlength+secondlength)/2)<BR>if (LoveCount> 6) amount= 30-((firstlength+secondlength)/2)<BR>if (LoveCount> 8) amount= 40-((firstlength+secondlength)/2)</FONT></P> <P><FONT size=1>if (LoveCount>10) amount= 50-((firstlength+secondlength)/2)</FONT></P> <P><FONT size=1>if (LoveCount>12) amount= 60-((firstlength+secondlength)/2)<BR>if (LoveCount>14) amount= 70-((firstlength+secondlength)/2)<BR>if (LoveCount>16) amount= 80-((firstlength+secondlength)/2)<BR>if (LoveCount>18) amount= 90-((firstlength+secondlength)/2)<BR>if (LoveCount>20) amount=100-((firstlength+secondlength)/2)<BR>if (LoveCount>22) amount=110-((firstlength+secondlength)/2)<BR>if (firstlength==0 || secondlength==0) amount= "Err";<BR>if (amount < 0) amount= 0;<BR>if (amount >99) amount=99;</FONT></P> <P><FONT size=1>document.loveform.output.value=amount+"%";</FONT></P> <P><FONT size=1></FONT> </P> <P><FONT size=1>}</FONT></P> <P><BR><FONT size=1></SCRIPT> </FONT> <P></P> <P><FONT size=1> <CENTER><BR> <TABLE cellSpacing=0 cellPadding=1 width=600 border=0><BR> <TBODY><BR> <TR><BR> <TD vAlign=top align=middle></TD></TR></TBODY></TABLE></CENTER><BR> <DIV align=center><BR> <CENTER><BR> <P><STRONG>ÖSSZEILLETEK?-Teszt</P><BR>Írd be a Neveteket az alábbi helyekre. <BR> <FORM name=loveform><BR> <P><INPUT value="A fiú neve" name=name1> + <INPUT value="a lány neve" <BR>name=name2> = <INPUT size=6 name=output> <BR><BR><INPUT onclick=calc() type=button value=Becslés! name=calculate> <BR></P></FORM></CENTER></DIV><BR> <P align=center><FONT face=arial size=-2></FONT> </P></STRONG></FONT>
|