Cara Membuat Penghitung kata dengan HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>
  <title>Hello!</title>
</head>

<body>

<TABLE class="lat2" border="0" width="100" bgcolor="#E0DADB" valign="top" align="center"><br>




<TD  WIDTH="250"><form name="wordcount">
Masukkan sembarang kalimat di sini<br>
<textarea rows="12" name="wordcount2" cols="38"
wrap="virtual"></textarea><br>
<input type="button" value="Hitung kata" onClick="hitung()"> <input
type="text" name="wordcount3" size="20">
</form>         {Form Menu inputan kata}
<script type="text/javascript">     { javascrip untuk menghitung jumlah angka}
function hitung(){
var formcontent=document.wordcount.wordcount2.value
isi=formcontent.split(" ")
document.wordcount.wordcount3.value=isi.length
}
</script>

</body>

</html>
Share on Google Plus

About Unknown

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment