Blog www.monzaemon.com sedang dialihkan ke monzaemon69.blogspot.com untuk sementara :')

lagi ngebahas ini

HTML Seberapa Besar Poin Nama Kamu

بِسْمِ اللّهِ الرَّحْمَنِ الرَّحِيْمِ  
mzm69 -HTML Seberapa Besar Poin Nama Kamu
<script LANGUANGE="JavaScript">
function hitung() {

first = document.form1.text1.value.toUpperCase() ;
firstlength = document.form1.text1.value.length ;
var LoveCount = 0;
for(count = 0; count<firstlength; count++) {
letter1= first.substring(count, count + 1);
if(letter1=='A') LoveCount+=1;
if(letter1=='B') LoveCount+=2;
if(letter1=='C') LoveCount+=3;
if(letter1=='D') LoveCount+=4;
if(letter1=='E') LoveCount+=5;
if(letter1=='F') LoveCount+=6;
if(letter1=='G') LoveCount+=7;
if(letter1=='H') LoveCount+=8;
if(letter1=='I') LoveCount+=9;
if(letter1=='J') LoveCount+=10;
if(letter1=='K') LoveCount+=11;
if(letter1=='L') LoveCount+=12;
if(letter1=='M') LoveCount+=13;
if(letter1=='N') LoveCount+=14;
if(letter1=='O') LoveCount+=15;
if(letter1=='P') LoveCount+=16;
if(letter1=='Q') LoveCount+=17;
if(letter1=='R') LoveCount+=18;
if(letter1=='S') LoveCount+=19;
if(letter1=='T') LoveCount+=20;
if(letter1=='U') LoveCount+=21;
if(letter1=='V') LoveCount+=22;
if(letter1=='W') LoveCount+=23;
if(letter1=='X') LoveCount+=24;
if(letter1=='Y') LoveCount+=25;
if(letter1=='Z') LoveCount+=26;

}

document.form1.output.value = LoveCount+ "";

}

</script>

<body bgcolor="#0F00FF">
<p>
<marquee>
<h4 align="center" >Masukkan nama anda</h4>
</p>
</marquee>
<b>
<form name="form1">
<table align="center">
<tr><td><input type="text" name="text1" onclick="hitung()" / > = </td>

<td><input type="text" name="output" /> </td>
<br>
</tr>
<tr>

</table>
<p align="center"><button type="button" onclick="hitung()"> Hitung </button> </p>

</form>
</b>
</body>
 by Reza

No comments:

Post a Comment