as I wanted to improve myself , I decided to create a calculation tool for my table top games. I've created an html form and a small script but when I'm clicking on the submit button... Nothing Happens. I've tried PHP instead of Javascript the result was exactly the same. So I wish , you could give me some advice and help me understand why it wasn't working.
<!DOCTYPE html>
<html>
<head>
<title>The Kiki Meter</title>
<link rel="stylesheet" type="text/css" href="apperence.css">
</head>
<body>
<h1>The Kiki Meter</h1>
<div>
<form name="Calculator">
Attack Dice Roll : <input type="text" name="Attack_Dice">
Defense Dice Roll : <input type="text" name="Defense_Dice">
IP : <input type="text" name="IP">
Strengh: <input type="text" name="Strengh">
Weapon Dmg : <input type="text" name="Weapon_Dmg">
<input type="submit" value="Calculer">
</div>
<script type="text/javascript">
var Attack = document.getElementsByName("Attack_Dice");
var Defense = document.getElementsByName("Defense_Dice");
var IP = document.getElementsByName("IP");
var Force = document.getElementsByName("Strengh");
var Weapon_Dmg = document.getElementsByName("Weapon_Dmg");
var Success=(Attack-Defense-IP)/100;
document.write(Success);
if (Success<0) {
document.write(Success/(-2));
}
else {
document.write((Force + Weapon_Dmg)*Success);
}
</script>
</body>
</html>