Belajar Tradig gratis dan dapatkan uang nyata..
https://sparkprofit.com/intro?by=yClcRK
https://sparkprofit.com/intro?by=yClcRK
<?Php
echo"<table width=100% border=0 cellpadding=5 cellspacing=0>
<tr><tr> BIODATA</td></tr>
<tr><td width=100>Nama </td><td width=1>:</td><td><input type=text name=nama onkeypress='return isNumberKey(event)'></td></tr>
<tr><td>Umur</td><td>:</td><td><input type=text name=umur onkeypress='return isNumberKeyTrue(event)' maxlength=2 onPaste='false'></td></tr></table>";
?>
//Hanya boleh Diisi dengan huruffunction isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if ((charCode < 65) || (charCode == 32))
return false;
return true;
}//Hanya boleh Diisi dengan Dengan Angka
function isNumberKeyTrue(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 65)
return false;
return true;
}
<html>
<title>Untitled Document</title>
<script type="application/javascript">
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if ((charCode < 65) || (charCode == 32))
return false;
return true;
}
</script>
<script type="application/javascript">
function isNumberKeyTrue(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 65)
return false;
return true;
}
</script>
</head>
<body>
<?Php
echo"<table width=100% border=0 cellpadding=5 cellspacing=0>
<tr><tr> BIODATA</td></tr>
<tr><td width=100>Nama </td><td width=1>:</td><td><input type=text name=nama onkeypress='return isNumberKey(event)'></td></tr>
<tr><td>Umur</td><td>:</td><td><input type=text name=umur onkeypress='return isNumberKeyTrue(event)' maxlength=2 onPaste='false'></td></tr>
</table>";
?>
</body>
</html>
Membuat nama Kolom |
Tabel yang telah dibuat |