what happen with my computer:
Code:
<html>
<head>
</head>
<script language="javascript">
function daftar()
{
var nama=formPendaftaran.txtNama.value;
var pass=formPendaftaran.txtPass.value;
var add=formPendaftaran.txtAdd.value;
if(nama=="")
{
alert("name please")
formPendaftaran.txtNama.focus();
}
else if(pass=="")
{
alert("password please")
formPendaftaran.txtPass.select();
}
else if(isNaN(pass))
{
alert("password must number")
formPendaftaran.txtPass.select();
}
else if(pass.length!=6)
{
alert("Password 6 digit please")
formPendaftaran.txtPass.select();
}
else if(add=="")
{
alert("address please")
formPendaftaran.txtAdd.focus();
}
else
alert("success")
}
</script>
<link href="style.css" rel="stylesheet" type="text/css">
<body class="body">
<form name="formPendaftaran">
<table class="border" align="center">
<tr>
<td colspan="2" class="font2" align="center">
Pendaftaran Anggota
</td>
</tr>
<tr>
<td class="font">
Nama :
</td>
<td>
<input type="text" name="txtNama"></input>
</td>
</tr>
<tr>
<td class="font">
Password :
</td>
<td>
<input type="password" name="txtPass"></input>
</td>
</tr>
<tr>
<td class="font">
Alamat:
</td>
<td>
<textarea name="txtAdd" rows="5" cols="20"></textarea>
</td>
</tr>
<td align="center" colspan="2">
<input type="button" name="btn1" value="Daftar" onClick="daftar()"></input>
<input type="reset" name="btn2"></input>
</td>
</tr>
</table>
</form>
</body>
</html>
Even with this simple javascript, my computer doesn't work, and don't show any alert when i validate it. But when i try it on my laptop nothing wrong, it's work perfectly.
So what happen with my computer and how to make it right, thx a lot ...
Bookmarks