Pertemuan ke sembilan

<html>
<head>
	<title>mencoba javascript</title>
	<script language="javascript">
	function test (val1,val2)
	{
	document.write("<br>"+"perkalian : val1*val2<br>")
	document.write(val1*val2)
	document.write("<br>"+"pembagian : val1*val2<br>")
	document.write(val1/val2)
	document.write("<br>"+"penjumlahan : val1*val2<br>")
	document.write(val1+val2)
	document.write("<br>"+"pengurangan : val1*val2<br>")
	document.write(val1-val2)
	document.write("<br>"+"modulus : val1*val2<br>")
	document.write(val1%val2)
	}
	</script>
</head>
<body>
<input type="button" name="button1" value="aritmatic" onclick=test(9,4)>
</body>
</html>

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s