Senin, 07 Maret 2011
TUGAS PRAKTIKUM MODUL 5
SCRIPT:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TUGAS PRAKTIKUM MODUL 5</title>
</head>
<h1 align="left">FORM PEMESANAN BERBASIS JAVA SCRIPT</h1>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function hitungPesan(){
var nota = document.form2;
var hargaBakso = 12000 * eval(nota.qBakso.value);
var hargaSoto = 10000 * eval(nota.qSoto.value);
var hargaMie = 15000 * eval(nota.qMie.value);
var hargaDegan = 5000 * eval(nota.qDegan.value);
var hargaCampur = 7000 * eval(nota.qCampur.value);
var jumlahTotal = hargaBakso + hargaSoto + hargaMie + hargaDegan + hargaCampur;
if (jumlahTotal > 50000){
nota.Total.value = jumlahTotal;
nota.Diskon.value = 10000;
nota.Bayar.value = jumlahTotal - eval(nota.Diskon.value);
}
else {
nota.Total.value = jumlahTotal;
nota.Diskon.value = 0;
nota.Bayar.value = jumlahTotal - eval(nota.Diskon.value);
}
}
function resetForm(){
document.form2.reset();
}
//-->
</script>
STUDY KASUS MODUL 5
SCRIPT:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>STUDY KASUS MODUL 5</title>
</head>
<h1 align="left">SIMPLE CALCULATOR</h1>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function hitung(){
var x=eval(document.form1.x.value);
var y=eval(document.form1.y.value);
var pil= document.form1.opt.value;
if (pil == "tambah") {
var z = x + y;
}
else if (pil == "kurang") {
var z = x - y;
}
else if (pil == "kali") {
var z = x * y;
}
else if (pil == "bagi") {
var z = x / y;
}
document.form1.hasil.value = z;
}
function hapus () {
document.form1.reset();
}
-->
Selasa, 01 Maret 2011
TUGAS PRAKTIKUM MODUL 4
SOURCE CODE CSS:
body {margin: 10px auto;
width: 1350px;
}
header,nav,section,footer {
display:block;}
header {
height:200px;
width:1350px;
background-image:url(aremania.jpg);}
nav{float:left;
width:1350px;
height:50px;
background-image:url(aremablue.jpg);
margin-right:5px;}
.nav #button a:active{
background-color:cyan;
}
.nav #search{
margin:5px;
margin-left:700px;
}
section{float:left;
width:1350px;
height:517px;
background-image:url(kanjuruhan.jpg);}
side1 {float:left;
height:480px;
width:480px;
border:6px solid blue;
background-image:url(along.jpg);
margin:20px;}
MODUL 4 - STUDY KASUS
SOURCE CODE CSS:
body
{
margin: 10px auto;
width: 750px;
}
header,nav,section,footer
{
display: block;
border: 1px solid blue;
}
header
{
height: 80px;
width: 750px;
border: 1px solid green;
}
nav
{
float: left;
width: 750px;
height: 80px;
border: 1px solid blue;
}
.nav #button a:active{
background-color:magenta;
}
.nav #search{
margin:5px;
margin-left:500px;
}
Langganan:
Postingan (Atom)
Senin, 07 Maret 2011
TUGAS PRAKTIKUM MODUL 5
SCRIPT:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TUGAS PRAKTIKUM MODUL 5</title>
</head>
<h1 align="left">FORM PEMESANAN BERBASIS JAVA SCRIPT</h1>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function hitungPesan(){
var nota = document.form2;
var hargaBakso = 12000 * eval(nota.qBakso.value);
var hargaSoto = 10000 * eval(nota.qSoto.value);
var hargaMie = 15000 * eval(nota.qMie.value);
var hargaDegan = 5000 * eval(nota.qDegan.value);
var hargaCampur = 7000 * eval(nota.qCampur.value);
var jumlahTotal = hargaBakso + hargaSoto + hargaMie + hargaDegan + hargaCampur;
if (jumlahTotal > 50000){
nota.Total.value = jumlahTotal;
nota.Diskon.value = 10000;
nota.Bayar.value = jumlahTotal - eval(nota.Diskon.value);
}
else {
nota.Total.value = jumlahTotal;
nota.Diskon.value = 0;
nota.Bayar.value = jumlahTotal - eval(nota.Diskon.value);
}
}
function resetForm(){
document.form2.reset();
}
//-->
</script>
STUDY KASUS MODUL 5
SCRIPT:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>STUDY KASUS MODUL 5</title>
</head>
<h1 align="left">SIMPLE CALCULATOR</h1>
<body>
<script language="JavaScript" type="text/javascript">
<!--
function hitung(){
var x=eval(document.form1.x.value);
var y=eval(document.form1.y.value);
var pil= document.form1.opt.value;
if (pil == "tambah") {
var z = x + y;
}
else if (pil == "kurang") {
var z = x - y;
}
else if (pil == "kali") {
var z = x * y;
}
else if (pil == "bagi") {
var z = x / y;
}
document.form1.hasil.value = z;
}
function hapus () {
document.form1.reset();
}
-->
Selasa, 01 Maret 2011
TUGAS PRAKTIKUM MODUL 4
SOURCE CODE CSS:
body {margin: 10px auto;
width: 1350px;
}
header,nav,section,footer {
display:block;}
header {
height:200px;
width:1350px;
background-image:url(aremania.jpg);}
nav{float:left;
width:1350px;
height:50px;
background-image:url(aremablue.jpg);
margin-right:5px;}
.nav #button a:active{
background-color:cyan;
}
.nav #search{
margin:5px;
margin-left:700px;
}
section{float:left;
width:1350px;
height:517px;
background-image:url(kanjuruhan.jpg);}
side1 {float:left;
height:480px;
width:480px;
border:6px solid blue;
background-image:url(along.jpg);
margin:20px;}
MODUL 4 - STUDY KASUS
SOURCE CODE CSS:
body
{
margin: 10px auto;
width: 750px;
}
header,nav,section,footer
{
display: block;
border: 1px solid blue;
}
header
{
height: 80px;
width: 750px;
border: 1px solid green;
}
nav
{
float: left;
width: 750px;
height: 80px;
border: 1px solid blue;
}
.nav #button a:active{
background-color:magenta;
}
.nav #search{
margin:5px;
margin-left:500px;
}
Langganan:
Postingan (Atom)