Scriptnya :
<html>
<head>
<title>Tugas Web(Membuat Form)</title>
<script type=”text/javascript”>
function pesan(){
if (document.reg.nama.value == “” && document.reg.nim.value == “” && document.reg.alamat.value == “”)
{
alert(“Namanipun Mboten Wonten isine !!!\nNim Kosong !!!\nAlamat Kosong !!!”)
}else if (document.reg.nim.value == “” && document.reg.alamat.value == “”)
{
alert(“Nimpun Mboten Wonten isine !!!\nAlamat Kosong !!!”)
}else if (document.reg.nama.value == “” && document.reg.alamat.value == “”)
{
alert(“Namanipun Mboten Wonten isine !!!\nAlamat Kosong !!!”)
}else if (document.reg.nama.value == “” && document.reg.nim.value == “”)
{
alert(“Namanipun Mboten Wonten isine!!!\nNim Kosong !!!”)
}else if (document.reg.nama.value == “”)
{
alert(“Namanipun Mboten Wonten isine !!!”)
}else if (document.reg.nim.value == “”)
{
alert(“Nimpun Mboten Wonten isine !!!”)
}else if (document.reg.alamat.value == “”)
{
alert(“Alamat Mboten Wonten !!!”)
}else {
alert(“Data Berhasil Dimasukan !\nNama :”+document.reg.nama.value+”\nNim :”+document.reg.nim.value+”\nAlamat :”+document.reg.alamat.value )
} }
</script>
</head>
<body>
<table width=”450″ border=”1″ align=”center” bordercolor=”#000000″>
<tr>
<td bgcolor=”#CCCCCC”><div align=”center”><font color=”#000000″><strong> FORM REGISTRASI </strong></font></div></td>
</tr>
<tr>
<td>
<form name=”reg”><table width=”440″ border=”0″ cellpadding=”1″>
<tr>
<td width=”107″><font color=”#000000″><strong>Nama</strong></font></td>
<td width=”21″><strong>:</strong></td>
<td width=”317″><input name=”nama” type=”text” size=”40″></td>
</tr> Continue reading ‘Tugas Pemrograman Web’
