JavaScript love calculator

Posted by Unknown On Friday 18 January 2013 22 comments

JavaScript love calculator


Hello friends now we presenting a simple java script love calculater .Its the first tutorial that having live demo on our blog . its simple funny and use some mathematics functions ,so it will help to understand how works java script functions and button click listeners..

Live demo                                    

Love Tester

-->
+ =
Scriptime.blogspot.in


Source

function calc() {

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=='L') LoveCount+=2; 
if (letter1=='O') LoveCount+=2; 
if (letter1=='V') LoveCount+=2; 
if (letter1=='E') LoveCount+=2; 
if (letter1=='Y') LoveCount+=3; 
if (letter1=='O') LoveCount+=1; 
if (letter1=='U') LoveCount+=3;
}

for (Count=0; Count < secondlength; Count++) {
letter2=second.substring(Count,Count+1);
if (letter2=='L') LoveCount+=2;
if (letter2=='O') LoveCount+=2; 
if (letter2=='V') LoveCount+=2; 
if (letter2=='E') LoveCount+=2;
if (letter2=='Y') LoveCount+=3;
if (letter2=='O') LoveCount+=1;
if (letter2=='U') 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+"%";
}

Download Source

                              

22 comments:

Unknown said...

very helpful site.. bro

Jehoshaphat said...

I've seen how it goes

Unknown said...

Thanks for sharing a nice article such a wonderful site you have done a great job once more thanks a lot

Love calculator

Love test

Love meter

True love calculator

Real love calculator

Love compatibility test

Love calculator game

Love test games

Love percentage

Love calculator online

Love meter test

True love test

Love calculator by name

Love test calculator

Love compatibility calculator

Name matching calculator

Real love test

Name love match

Love match

Love detector

Wishes said...

This is really a great article and great read for me. Its my first visit to your blog and i have found it so useful and informative specially this article.
easter sunday message
funny easter captions
christian easter poems
easter bible study
easter poems religious
easter thoughts
funny easter poems
happy easter religious messages
easter vigil
easter phrases
easter kjv
easter poems for children's church
famous easter poems
easter poems for preschoolers
easter scriptures he is risen
happy easter messages

Unknown said...

Thanks for sharing a nice article such a wonderful site you have done a great job once more thanks a lot

Amazing!!! I like this website so much it's awesome.I have also gone through your other posts too, and they are also very much appreciate able, and I'm just waiting for your next update to come as I like all your posts... well I have also made an article hope you go through it.
Happy Mothers Day Pictures
Mothers Day Wallpapers
Happy Mothers Day Wallpapers

Unknown said...

Amazing!!! I like this website so much it's awesome.I have also gone through your other posts too, and they are also very much appreciate able, and I'm just waiting for your next update to come as I like all your posts... well I have also made an article hope you go through it.

This is great, unique and very informative post; I like it. thanks
july 4th 2018
happy 4 july
4 july usa

4th of july said...

The information you have posted is very useful. The sites you have referred was good. Thanks for sharing.
Mothers Day Images
Happy Mothers Day Images
Mothers Day Images 2018
Images Of Mothers Day
Mothers Day Image

Shubham said...

Nice script with live demo , very helpful

Rajeshartya said...

Extratorrent proxy 2018

Free movie Sites

Sportsarefree.xyz

rajkingsh@85gmail.com said...

Amazing!!! I like this website so much it's really awesome.I have also gone through your other posts too and they are also very much appreciate able and I'm just waiting for your next update to come as I like all your posts... well I have also made an article hope you go through it.
Easter 2019 Images
Easter Images

Deepak said...

antimalware service executable high ram
best radar detector for the money
cartooncrazy techavy
swatchseries techradardeals
rarbg proxy list 2020

umut said...

https://saglamproxy.com
metin2 proxy
proxy satın al
knight online proxy
mobil proxy satın al
JYG

MoonlightRönesans37 said...

adıyaman evden eve nakliyat
kastamonu evden eve nakliyat
kırklareli evden eve nakliyat
diyarbakır evden eve nakliyat
ankara evden eve nakliyat
ZİA0

ZirveDağcısı52 said...

urfa evden eve nakliyat
malatya evden eve nakliyat
burdur evden eve nakliyat
kırıkkale evden eve nakliyat
kars evden eve nakliyat
6XQY

F0D92Janessa333F5 said...

57B8A
Eskişehir Evden Eve Nakliyat
Ardahan Evden Eve Nakliyat
Referans Kimliği Nedir
Çerkezköy Oto Boya
Çerkezköy Oto Lastik
Bayburt Evden Eve Nakliyat
Tekirdağ Cam Balkon
Ünye Evden Eve Nakliyat
Ünye Çatı Ustası

D9ACFPhilip0F9AC said...

B443A
Çerkezköy Oto Elektrik
Çerkezköy Çamaşır Makinesi Tamircisi
Çerkezköy Çatı Ustası
Keçiören Fayans Ustası
Silivri Evden Eve Nakliyat
Huobi Güvenilir mi
Ünye Mutfak Dolabı
Düzce Evden Eve Nakliyat
Karaman Evden Eve Nakliyat

5779DLester848C9 said...

FAEEB
Kripto Para Kazanma
Bitcoin Madenciliği Nasıl Yapılır
Coin Üretme Siteleri
Binance Kaldıraçlı İşlem Nasıl Yapılır
Bitcoin Üretme
Coin Kazma Siteleri
Binance Borsası Güvenilir mi
Bitcoin Nasıl Çıkarılır
Kripto Para Nasıl Kazılır

031EBDaniel21721 said...

DE7BC
resimli magnet
referans kimliği nedir
binance referans kodu
referans kimliği nedir
resimli magnet
binance referans kodu
binance referans kodu
resimli magnet
binance referans kodu

__Takipci Satin al said...

50219
yulaf bal sabunu
çörek otu sabunu
huobi
çörek otu sabunu
paribu
çay ağacı sabunu
okex
bitrue
mexc

-------takipci satin alma said...

5FE53
probit
bitexen
btcturk
kripto ne demek
bingx
mobil 4g proxy
okex
okex
cointiger

_____Takipci_ said...

8FF5F
probit
aax
bybit
kaldıraç ne demek
bybit
binance referans
binance referans kimliği nedir
referans kod
binance ne demek

----Takipci said...

87661
binance ne demek
toptan mum
bitcoin haram mı
bitcoin nasıl kazanılır
mexc
telegram kripto para kanalları
kraken
kripto para haram mı
bitexen

Post a Comment

Fashion