JSFiddle - React, Tailwind, and code Playground

HTML

<!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>