I have this JS function:
Code JavaScript:
var maxAmount = 250;
function textCounter(textField, showCountField) {
    if (textField.value.length > maxAmount) {
        textField.value = textField.value.substring(0, maxAmount);
} else { 
        showCountField.value = maxAmount - textField.value.length;
}
}

I also have a form in which I need ti use the fuction:
Code JavaScript:
<body>
<form>
<textarea name="ta" rows="6" style="width:340px;" onKeyDown="textCounter(???????,???????);" onKeyUp="textCounter(???????,???????);"></textarea>
<br>
<input readonly id="ta2"type="text" name="countDisplay" size="3" maxlength="3" value="250"> Characters Remaining
</form>
</body>

How do I reference my the parameters of my function from the form?