我在Firefox中收到以下代码中的“提交不是函数”错误。我也尝试过document.getElementById(“editInvNotesForm”)。submit();和 document.Forms [0] .submit();等等。使用getElementById不会给出任何错误,但是没有提交表单的更新值。我感谢任何帮助。
<input type="submit" value='<liferay-ui:message key="btn.save" />' onclick="return validateNotes(this)" onmouseover="this.className='clsBlueButtonOver'" onmouseout="this.className='clsBlueButton'" class="clsBlueButton" />
</td>
<script type="javascript">
function validateNotes(saveButton)
{
if(document.getElementById('noteText${itemNoteVo.noteNo}').value<=0 ){
alert(Liferay.Language.get('msg.enter-report-note'));
document.getElementById('noteText${itemNoteVo.noteNo}').focus();
return false;
}
if (document.getElementById('noteText${itemNoteVo.noteNo}').value.search(/[<>]+/) != -1) {
alert(Liferay.Language.get('msg.angle-brackets-not-allowed'));
document.getElementById('noteText${itemNoteVo.noteNo}').focus();
return false;
}
saveButton.disabled=true;
saveButton.className='clsBlueButton';
document.editInvNotesForm.submit();
return true;
}
</script>
Thanks