The JavaScript should be something like:
The recordcount check should contain HTML code.
Code:
var count = parseInt(document.getElementById('theValue').value) +1;
Comment