var name= document.getElementById("name").value;
var age= document.getElementById("age").value;
This function does nothing. You should use
<form action = "" onsubmit = "return checkForm()">
and add the necessary validation to the function. as Logic Ali says, you may have only one form tag.
A proper name may also include a space and an apostrophe - Peter O'Reilly.
' or 'id' or 'value' or 'test' or 'text' or 'checked' or 'click' or 'href' or 'closed' or 'go' or 'submit' or 'replace' or 'button' or 'radio' or 'parseInt'.
alerts are obsolete as a method of displaying a message to your users. Prefer to use DOM methods.
He has learnt that if you play with fire then you risk getting bitten. - Commentator Radio 5 Live