Monday, 15 June 2015

DOM

<!DOCTYPE html>
<html>
<head>
<style>
p {
width:100px;
}

   .err {
color:red;
font-style:italic;
font-size:10px;
   }
 </style>
 <script>
   function cek(){
status_oke = true;
// cek NIM tidak boleh kosong
if (surat.nama.value.trim() == ""){
 document.getElementById("err_nama").innerHTML="Nama Harus Diisi";
 status_oke = false;
} else {
 document.getElementById("err_nama").innerHTML="";
}  
// cek nama tidak boleh kosong
if (surat.email.value.trim() == ""){
 document.getElementById("err_email").innerHTML="Email Harus Diisi";
 status_oke = false;
} else {
 document.getElementById("err_email").innerHTML="";
}
// cek komentar tidak boleh kosong
if (surat.komen.value.trim() == ""){
 document.getElementById("err_komen").innerHTML="komentar Harus Diisi";
 status_oke = false;
} else {
 document.getElementById("err_komen").innerHTML="";
}
     return status_oke;
   }

function validateForm()
{
var x=document.forms["surat"]["email"].value;
var atpos=x.indexOf("@");
var dotpos=x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
 {
 alert("Not a valid e-mail address");
 return false;
 }
}
function tutup_form_komen(){
document.getElementById("komen").innerHTML="";
  }
  function form_komen(){
    cForm  = "<form action='#' method='post' onsubmit='return cek(), validateForm();' name='surat'>";
    cForm += "email : <input type='text' name='email' /><span class = 'err' id='err_email' ></span><br/>";
cForm += "Nama : <input type='text' name='nama' /><span class = 'err' id='err_nama' ></span><br/>";
    cForm += "Komentar : <br/>";
    cForm += "<textarea name='komen'></textarea><span class = 'err' id='err_komen' ></span><br/>";
    cForm += "<br/><input type='submit' value='Publish' />";
    cForm += "</form>";
    document.getElementById("komen").innerHTML=cForm;
  }
</script>
</head>
<body>
  <input type="button" value="Komen" onClick="form_komen()">
  <input type="button" value="Tutup Komen" onClick="tutup_form_komen()">
  <div id="komen"></div>

</body>
</html>

Monday, 8 June 2015

Penggunaan function javascript

<!DOCTYPE html>
<html>
<head>
<script language="javascript">
function hargaKamar(){
f1.harga.value=f1.jenis.value;
 }
function total1(){
f1.tot1.value=(parseInt(f1.harga.value))*(parseInt(f1.hari.value));
 }
 function hargaKamar1(){
f1.harga1.value=f1.meeting.value;
 }
 function total2(){
f1.tot2.value=(parseInt(f1.harga1.value))*(parseInt(f1.hari1.value));
 }
 function hargaKamar2(){
f1.harga2.value=f1.extra.value;
 }
 function total3(){
f1.tot3.value=(parseInt(f1.harga2.value))*(parseInt(f1.hari2.value));
 }
  function hargaKamar3(){
f1.harga3.value=f1.air.value;
 }
 function total4(){
f1.tot4.value=(parseInt(f1.harga3.value))*(parseInt(f1.hari3.value));
 }
 function Brutto(){
f1.brutto.value=parseInt(f1.tot1.value)+parseInt(f1.tot2.value)+parseInt(f1.tot3.value)+parseInt(f1.tot4.value);
 }
  function totaldisk(){
if (f1.diskon[0].checked){
f1.totdisk.value=(f1.diskon[0].value)*(f1.brutto.value);
}
else if(f1.diskon[1].checked){
f1.totdisk.value=f1.diskon[1].value*f1.brutto.value;
}
else{
f1.totdisk.value=f1.diskon[2].value*f1.brutto.value;
}
  }
  function Netto(){
  f1.netto.value=parseInt(f1.brutto.value)-parseInt(f1.totdisk.value);
  }
  function total(){
  f1.kembali.value=parseInt(f1.bayar.value)-parseInt(f1.netto.value);
  }
 </script>
</head>
<body>
<table border="1px">
<form name="f1">
<tr>
<th>Jenis Kamar</th>
<th>Harga</th>
<th>Banyak Hari</th>
<th>Total Biaya kamar</th>
</tr>
<tr>
<th><select name="jenis" onChange="hargaKamar()">
<option value="0">.::PILIHAN::.</option>
<option value="100000">Standar</option>
<option value="200000">VIP</option>
<option value="300000">President Suite</option>
</select>
</th>
<th><input type="text" name="harga" disabled /> </th>
<th><input type="text" name="hari" onChange="total1(),Brutto()"></th>
<th><input type="text" name="tot1" value="0" disabled></th>
</tr>
<tr >
<td colspan="4">Fasilitas Tambahan</td>
</tr>
<tr>
<td><input type="checkbox" name="meeting" value="2000000" onChange="hargaKamar1()"/>Meeting</td>
<th><input type="text" name="harga1" value="0" disabled /> </th>
<th><input type="text" name="hari1" onChange="total2(),Brutto()"></th>
<th><input type="text" name="tot2" value="0" disabled></th>
</tr>
<tr>
<td><input type="checkbox" name="extra" value="100000" onChange="hargaKamar2()"/>Extra Bed</td>
<th><input type="text" name="harga2" value="0" disabled /> </th>
<th><input type="text" name="hari2" onChange="total3(),Brutto()"></th>
<th><input type="text" name="tot3" value="0"disabled></th>
</tr>
<tr>
<td><input type="checkbox" name="air" value="50000" onChange="hargaKamar3()" />Air Panas</td>
<th><input type="text" name="harga3" value="0" disabled /> </th>
<th><input type="text" name="hari3" onChange="total4(),Brutto()"></th>
<th><input type="text" name="tot4" value="0" disabled></th>
</tr>
<tr >
<td colspan="4">PEMBAYARAN</td>
</tr>
<tr >
<td colspan="3">Total Biaya/Brutto</td>
<td><input type="text" name="brutto"  value="0" disabled></td>
</tr>
<tr >
<td colspan="3">Diskon <input type ="radio" name="diskon" value="0" onChange="totaldisk(),Netto()">No Diskon
<input type ="radio" name="diskon" value="0.1" onChange="totaldisk(),Netto()">10%
<input type ="radio" name="diskon" value="0.2" onChange="totaldisk(),Netto()">20%</td>
<td><input type="text" name="totdisk"  disabled></td>
</tr>
<tr >
<td colspan="3">Netto</td>
<td><input type="text" name="netto"  value="0" disabled></td>
</tr>
<tr >
<td colspan="3">Pembayaran</td>
<td><input type="text" name="bayar"  value="0" onChange="total()"></td>
</tr>
<tr >
<td colspan="3">Kembali</td>
<td><input type="text" name="kembali"  value="0" disabled></td>
</tr>
</form>
</table>
</body>
</html>


Monday, 1 June 2015

Cara Hosting Website menggunakan idhostinger

buka idhostinger.com

isi bagian subdomain

 setelah berhasil akan muncul seperti di bawah ini

cek/ melakukan kofirmasi pendaftaran

Monday, 25 May 2015

membuat form dan menampilkan

form.html
<!DOCTYPE html>
<html>
<body>
<form action="proses.php" method="post">
No. KTP : <input type="text" name="noktp" size="16" maxlength="16"/><br/>
NAMA : <input type="text" name="nama"/><br/>
ALAMAT : <textarea  name="alamat"></textarea><br/>
JENIS KELAMIN : <input type="radio" name="seks" value="L" checked>Laki-laki
<input type="radio" name="seks" value="P">Perempuan<br/>
No Handphone : <input type="text" size="36" name="nohp" id="nohp"/><br/>
ID : <input type="text" name="id" size="10"maxlength="10" value="masukkan id"><br/>
PASSWORD : <input type="password" id="password" size="10" maxlength="10" name="pass"><br/>
<input type="submit" name="submit" value="Daftar">
<input type="reset" name="reset" value="Reset">

</form>
</body>
</html>

proses.php
<?php
echo " <h1>DATA MEMBER </h1>";
echo "<br/>No. KTP: ".$_POST['noktp'];
echo "<br/>NAMA  :".$_POST['nama'];
echo "<br/>ALAMAT :".$_POST['alamat'];
echo "<br/>JENIS KELAMIN :".$_POST['seks'];
echo "<br/>No. Hp :".$_POST['nohp'];
echo "<br/>ID :".$_POST['id'];
echo "<br/>PASSWORD :".$_POST['pass'];
?>



Monday, 11 May 2015

<table border="1px">
<tr>
<td colspan="6" align="middle">EVENT</td>
</tr>
<tr align="middle">
<td>Tempat</td>
<td>Acara</td>
<td>Hari/tanggal</td>
<td>Jam</td>
<td colspan="2">Status</td>
</tr>
<tr>
<td rowspan="3">Parangtritis</td>
<td>Peringatan 1 suro</td>
<td>Kamis, 14 mei 2015</td>
<td>15.00 s/d selesai</td>
<td bgcolor="red">Tertutup</td>
<td>Terbuka</td>
</tr>
<tr>
<td rowspan="2">Tolak Bala</td>
<td>Sabtu, 23 mei 2015</td>
<td rowspan="2">10.00 s/d 12.00</td>
<td rowspan="2">Tertutup</td>
<td rowspan="2" bgcolor="green">Terbuka</td>
</tr>
<tr>
<td>Sabtu, 30 mei 2015</td>
</tr>
<tr>
<td colspan="6" align="right">Penanggung Jawab : Panitia Penyelenggara</td>
<tr>
</table>


Monday, 20 April 2015

Image dan hyperlink pada image

<div id="news">
<h1>Wisata Merapi</h1>
<img src="pict/merapi.jpeg" vspace="20" hspace="50" align="left">
Merapi Sunrise Trip adalah salah satu paket yang kami layani bagi para anda yang suka menikmati serta menginginkan menikmati terbit matahari di lereng Merapi sekaligus menikmati pemandangan Merapi dan kota Yogyakarta dari lereng Merapi sebelah selatan. Banyak hal yang dapat anda nikmati di paket ini seperti Keindahan Merapi nan agung di pagi hari, menikmati terbitnya matahari pagi di Kaliadem, Obyek Wisata Batu Alien atau Gumuk Boll (Opsional), menikmati segarnya udara pagi di Merapi, menikmati sensasi petualangan dan perjalanan dengan jeep di pagi hari, menikmati keindahan kota Yogyakarta dan sekitarnya dari Merapi (5 kilo meter dari Puncak Merapi), menikmati berburu foto matahari terbit sambil menikmati coffeebreak.</br>
<a href="home.html"><img src="pict/back.jpg" width="60px" height="50"></a>
</div>


Monday, 13 April 2015

CSS Navigasi

<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body{
background-image:url(pict/parangtritis.jpg);
background-size:cover;
}
#wrap {
max-width:1000px;
margin:auto;
/*background-color:lightyellow;*/
}
#menu_horizontal {
width:1000px;
height:100px;
background-color:none;
color:black;
text-align:center;
position:fixed;
top:0px;
z-index:200;
}
#slogan {
position:absolute;
top:10px;
width:200px;
height:80px;
left:10px;
/*background-color:yellow;*/
}
#gambar {
position:absolute;
top:10px;
width:200px;
height:80px;
right:10px;

}
#header {
position:relative;
margin-top:200px;
width:1000px;
height:40px;
display:block;
}
#header ul{
padding:0px;
margin:0px;
list-style-type:none;
text-align:center;
}
#header li{
display:inline;
}
#header li a{
text-decoration:underline;
margin-top:70px;
background-color:brown;
color:white;
border-right:1px solid gray;
padding:.9em 8em;
font-size:16px;
}
#header li a:hover{
background-color:gray;
color:white;
}
#kiri{
width:200px;
margin-top:0px;
min-height:510px;
position:relative;
display:block;
float:left;
}
#menu_vertikal{
position:absolute;
width:214px;
height:148px;
display:block;
border:1px solid black;
}
#login{
position :absolute;
top:150px;
width:214px;
height:150px;
background-color:lightblue;
display:block;
border:1px solid black;
margin-bottom:200px;
}
#login form{
text-align:center;
}
#event{
position :absolute;
top:301px;
width:400px;
height:231px;
background-color:none;
display:block;
border:1px solid black;
margin-bottom:200px;
}
#news{
width:783px;
margin-top:0px;
min-height:300px;
margin-left:15px;
display:block;
float:left;
background-color:white;
border:1px solid black;
}
#fasilitas{
width:598px;
margin-top:0px;
height:230px;
margin-left:200px;
display:block;
float:left;
/*background-color:lightblue;*/
border:1px solid black;
}
#footer{
clear:both;
margin-top:50px;
max-width:1000px;
height:80px;
background-color:lightgray;
color:black;
display:block;
text-align:center;
padding:2px;
opacity:0.4;
filter:alpha(pacity=0.4);
}
</style>
</head>
<body>
<div id="wrap">
<div id="menu_horizontal">
<div id="slogan"></div>
<div id="gambar"><image src="pict/logo.jpeg" height="150px" width="150px"></div>
</div>
<div id="header">
<ul>
<li><a href='home.html'>Home</a></li>
<li><a href='alam.html'>Wisata Alam</a></li>
<li><a href='buatan.html'>Wisata buatan</a></li>
</ul>
</div>
<div id="kiri">
<div id="menu_vertikal"><image src="pict/borobudur.jpeg" height="214px" width="214px">Koleksi Foto</div>
<div id="login"><text align="center">login
<form align="center"action="#" type="get">
ID :</br><input type="text" name="nama"/></br>
PASSWORD :<input type="text" name="pass"/>
</form>
</div>
<div id="event">event</div>
</div>
<div id="news">Berita(News)</div>
<div id="fasilitas">Fasilitas(Facility)</div>
<div id="footer">
<p style="font:11px verdana">
Hak Cipta &copy; 2015 Kelompok praktikpengenalanweb1.blogspot.com</p>
<p style="font:15px Courier New" >
Telp. +62(721)282828 Fax. +62(315)232323</br>
Email : <b>dinaspariwisata@jogjaprov.go.id</b></p>
</div>
</div>
</body>
</html>

Monday, 9 March 2015

PROSES INSTALISASI WEB SERVER XAMPP

 Langkahpertamaklikaplikasi web server (XAMPP) yang sudahada, jikabelummemilikibisadilihatdisini (caramendownloadaplikasi web server).Kemudianakanmunculgambarseperti di bawah.


·         Kemudian, klik next.

·         Kemudian, klik nextdanjanganlupauntukmencentangsemuafitur yang dibutuhkansaja.


·         Setelahmunculgambarseperti di atas, langsungsajaklik next kembali

·         Kemudianakanmunculgambar di atas. Laluklik next kembali

·         Setelahitu, menunggu proses instalisasihinggaselesai, sepertigambar di bawah.


·         Setelahselesaiklik finish.

CARA MENDOWNLOAD APLIKASI “XAMPP"

·         Untuk pencarian aplikasi XAMPP kami menggunakan 4shared.com
 ·         Ketik pada kotak pencarian “XAMPP” klik search.
·         Setelah muncul seperti gambar di atas klik XAMPP yang paling atas, kemudian akan muncul  gambar seperti di bawah ini.
·         Setelah muncul tampilan seperti di atas klik tombol “unduh”.
·         Setelah muncul tampilan seperti di atas klik tombol “UNDUH GERATIS”, tunggu sejenak hingga pengunduhan selesai.