A Pen by emin

Thumbnail
This awesome code was written by -I_G_O_R-, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright -I_G_O_R- ©

Technologies

  • HTML
  • CSS
  • JavaScript
    <html>
<head>
<title>Basit Hesap Makinesi</title>
<script src="https://code.jquery.com/jquery-1.10.1.min.js"> </script>
<script type="text/javascript">
$(document).ready(function(){
	$("#bolme").click(function(){
		var eski=$('input[type="text"]').val()/2;
		$('input[type="text2"]').val(eski);
	});
	$("#kareal").click(function(){
		var deger=$('input[type="text"]').val()*$('input[type="text"]').val();
		$('input[type="text2"]').val(deger);
	});
	$("#usteyuvarla").click(function(){
		var yen=$('input[type="text2"]').val();
		var a=Math.round(yen);
		$('input[type="text2"]').val(a);
	});
	$("#altayuvarla").click(function(){
		var yeni=$('input[type="text2"]').val();
		var b=Math.floor(yeni);
		$('input[type="text2"]').val(b);
	});
	$("#carpma").click(function(){
		var eski=$('input[type="text"]').val()*2;
		$('input[type="text2"]').val(eski);
	});
	$("#sayıuret").click(function(){
		var rast=Math.round(Math.random()*10);
		$('input[type="text2"]').val(rast);
		
	});
});
</script>
</head>
<body>
<input type="text" value="0"/>
Sonuç:<input type="text2" value="0"/><br>
<button id="bolme">2 ye Bölme   </button>
<button id="kareal">Kare Alma   </button><br>
<button id="usteyuvarla">Üste Yuvarlama</button>
<button id="altayuvarla">Alta Yuvarlama</button><br>
<button id="carpma">2 ile Çarpma   </button> 
<button id="sayıuret">Rastgele Sayı Üretme</button>
</body>
</html>

/*Downloaded from https://www.codeseek.co/-I_G_O_R-/a-pen-by-emin-ubHsk */
    


/*Downloaded from https://www.codeseek.co/-I_G_O_R-/a-pen-by-emin-ubHsk */
    

Comments