Sorry, I don't know what I'm doing. My javascript is being ignored when I upload this html... any suggestions? <!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<script>
function updateModifiers() {
// convert ability scores to modifiers
var strScore = document.getElementById("strScore").value;
var dexScore = document.getElementById("dexScore").value;
document.getElementById("strMod").value = Math.floor((strScore-10)/2)
document.getElementById("dexMod").value = Math.floor((dexScore-10)/2)
}
</script>
</head>
<body>
<div id="pageContainer">
<table>
<tr>
<th>Ability</th>
<th>Score</th>
<th>Modifier</th>
</tr>
<tr>
<td>
STR
</td>
<td>
<input type="number" value=10 placeholder=10 id="strScore" onchange="updateModifiers()">
</td>
<td>
<input type="number" placeholder=0 id="strMod">
</td>
</tr>
<tr>
<td>
DEX
</td>
<td>
<input type="number" value=10 id="dexScore">
</td>
<td>
<input type="number" placeholder=0 id="dexMod">
</td>
</tr>
<tr>
<td>
CON
</td>
<td>
<input type="number" value=10 id="conScore">
</td>
<td>
<input type="number" placeholder=0 id="conMod">
</td>
</tr>
<tr>
<td>
INT
</td>
<td>
<input type="number" placeholder=10 id="intScore">
</td>
<td>
<input type="number" placeholder=0 id="intMod">
</td>
</tr>
<tr>
<td>
WIS
</td>
<td>
<input type="number" value=10 id="wisScore">
</td>
<td>
<input type="number" placeholder=0 id="wisMod">
</td>
</tr>
<tr>
<td>
CHR
</td>
<td>
<input type="number" value=10 id="chrScore">
</td>
<td>
<input type="number" placeholder=0 id="chrMod">
</td>
</tr>
</table>
<h2>
Level
</h2>
<input type="number" placeholder=1 id="level" min=1 max=20>
<h2>
Proficiency Bonus
</h2>
<input type="number" placeholder=0 id="profBonus">
</div>
</body>
</html>