Is there a way to implement the Heron formula and semiperimeter with 3 sides in JavaScript? The function should return the area of the triangle based on input values of A, B, and C. Additionally, it needs to check if the sum of two sides is greater than the third side (a+b>c) and only accept numerical inputs via forms instead of letters.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Triangle Area Calculator</title>
</head>
<body>
<script>
function calculateArea(sideA, sideB, sideC) {
var result;
result = Math.sqrt(((sideA + sideB + sideC) / 2 - sideA) * ((sideA + sideB + sideC) / 2 - sideB) * ((sideA + sideB + sideC) / 2 - sideC));
return result;
}
var triangleArea = calculateArea(3, 4, 5);
document.write("The area of the triangle is: " + triangleArea);
</script>
</body>
</html>