我有代码:
function check($ile,$co,$gdzie)
{
if (document.forms.form.$co.value.length >= $ile){
document.forms.form.$gdzie.focus();
}
}
而且它不起作用。错误(在谷歌浏览器中检查):
Uncaught TypeError: Cannot read property 'value' of undefined script.js:39
check script.js:39
onkeyup
这是我的html代码:
<p><label><?php echo TEL; ?>: <input type='text' name='tel' size='9' maxlength='9' onkeypress="keyPressNumb(event);" onKeyUp="check(9,'tel','pesel');"></label></p>
<label><?php echo PESEL; ?>:<span class='red'>*</span> <input type='text' name='pesel' size='11' maxlength="11" onKeyUp="check11();" onkeypress="keyPressNumb(event);"></label></p>