İlginizi Çekebilir
  1. Ana Sayfa
  2. Web Tasarım ve Programlama
  3. Web Tasarım ve Programlama Dersi 2.Dönem 1.Uygulama Sınav Soru ve Cevapları

Web Tasarım ve Programlama Dersi 2.Dönem 1.Uygulama Sınav Soru ve Cevapları

Aşağıdaki tabloya göre Taşıt Vergisi hesaplamasını yapan Html sayfasını javascript kodları yardımıyla oluşturunuz. (40p)

Arac Vergi Tablosu
OtomobilKamyon-Kamyonet
Motor Hacmi1-3 Yas4–6 yasMotor Hacmi1-3 Yas4–6 yas
0-13006003500-1300900600
1301-16009006501301-16001200800
<!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>bilisimogretmeni.com</title>
<script language="javascript" type="text/javascript">
 function islem()
{
	var x=document.getElementById("arac");
	var y=document.getElementById("yas");
	var z=document.getElementById("motor");
	
if (x[0].selected && y[0].selected && z[0].selected)
{
	document.getElementById("s1").value=600;
}
if (x[0].selected && y[0].selected && z[1].selected)
{
	document.getElementById("s1").value=900;
}
if (x[0].selected && y[1].selected && z[0].selected)
{
	document.getElementById("s1").value=350;
}
if (x[0].selected && y[1].selected && z[1].selected)
{
	document.getElementById("s1").value=650;
}
if (x[1].selected && y[0].selected && z[0].selected)
{
	document.getElementById("s1").value=900;
}
if (x[1].selected && y[0].selected && z[1].selected)
{
	document.getElementById("s1").value=1200;
}
if (x[1].selected && y[1].selected && z[0].selected)
{
	document.getElementById("s1").value=600;
}
if (x[1].selected && y[1].selected && z[1].selected)
{
	document.getElementById("s1").value=800;
}
	document.getElementById("s2").value=document.getElementById("s1").value/2;
	document.getElementById("s3").value=document.getElementById("s1").value/2;
}
</script>
</head>

<body>
<h2>"Vergilendirilmiş Kazanç Kutsaldır."
</h2>
<hr  align="left" width="500"/>

Araç Tipi :
<select  id="arac">
<option value="1"> Otomobil </option>
<option value="2"> Kamyon-Kamyonet </option>
</select>
<br />
Araç Yaşı :
<select  id="yas" >
<option value="1"  > 1-3 </option>
<option value="2"> 4-6 </option>
</select>
<br />
Motor Hacmi :
<select  id="motor" >
<option value="1"  > 0-1300 </option>
<option value="2"> 1301-1600 </option>
</select>
<br />
  <input type="button" name="dugme" value="Hesapla" onclick="islem()" />
  <br />
Yıllık Tutar..:<input type="text" name="metin" id="s1" /><br />
İlk Taksit....:  <input type="text" name="metin" id="s2" /><br />
İkinci Taksit:  <input type="text" name="metin" id="s3" /><br />
</body>
</html>

[wp-js-fiddle url=”http://jsfiddle.net/BilisimOgretmeni/x75jM/” style=”width:100%; height:400px; border:solid #4173A0 1px;”]

2- İki Kenar uzunluğu girilen bir dörtgenin kare veya dikdörtgen olup olmadığını bulan programı javascript kodları ile yapın..
[wp-js-fiddle url=”http://jsfiddle.net/BilisimOgretmeni/RMryZ/
” style=”width:100%; height:400px; border:solid #4173A0 1px;”]

<!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" />
<script type="text/javascript" language="javascript">
function hesap()
{
var k1,k2;
k1=eval(document.dortgen.kenar1.value);
k2=eval(document.dortgen.kenar2.value);
if(k1==k2)
{
document.getElementById("sonuc").innerHTML="Şekil Kare";
//www.bilisimogretmeni.com
}
else
{
document.getElementById("sonuc").innerHTML="Şekil Dikdörtgen";
//www.bilisimogretmeni.com
}
}
</script>
<title>Başlıksız Belge</title>
</head>
<body>
<form name="dortgen">
<table>
<tr>
<td>1.Kenar</td>
<td><input type="text" name="kenar1" /></td>
</tr>
<tr>
<td>2.Kenar</td>
<td><input type="text" name="kenar2" /></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="button" onclick="hesap()" value="Kontrol Et" /></td>
</tr>
</table>
</form>
<p id="sonuc"></p>
</body>
</html>

3-İki kenar uzunluğu girilen dörtgenin yapılan seçime göre alan veya çevresini hesaplayan programı javascript kodları ile yapın..

<!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" />
<script type="text/javascript" language="javascript">
function hesap()
{
var k1,k2,sonuc;
k1=eval(document.dortgen.kenar1.value);
k2=eval(document.dortgen.kenar2.value);
 if (document.dortgen.formul[0].checked)
    {//www.bilisimogretmeni.com
    sonuc=k1*k2;
    }
	 if (document.dortgen.formul[1].checked)
    {//www.bilisimogretmeni.com
   sonuc=(2*k1)+(2*k2);
    }	
document.getElementById("sonuc").innerHTML="İşlem Sonucu= "+sonuc;
//www.bilisimogretmeni.com
}
</script>
<title>Başlıksız Belge</title>
</head>
<body>
<form name="dortgen">
<table>
<tr>
<td>1.Kenar</td>
<td><input type="text" name="kenar1" /></td>
</tr>
<tr>
<td>2.Kenar</td>
<td><input type="text" name="kenar2" /></td>
</tr>
<tr>
<tr>
<td>Yapılacak İşlem</td>
<td>
<input type="radio" name="formul" value="Alan" />Alan<br />
<input type="radio" name="formul" value="Cevre"/>Çevre<br /></td>
</tr>
<tr>
<td align="center" colspan="2"><input type="button" onclick="hesap()" value="Hesapla" /></td>
</tr>
</table>
</form>
<p id="sonuc"></p>
</body>
</html>

[wp-js-fiddle url=”http://jsfiddle.net/BilisimOgretmeni/tjJb8/” style=”width:100%; height:400px; border:solid #4173A0 1px;”]

Yorum Yap

Kimler Neler Demiş?

Bir Cevap Yazın

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Bildir