function commentcheck() { if (document.frmcomment.cusername.value=="") { alert("请输入用户名"); document.frmcomment.cusername.focus(); return false; } if (document.frmcomment.cpwd.value=="") { alert("请输入密码"); document.frmcomment.cpwd.focus(); return false; } return true; } function comment2() { if (document.frmcomment.cusername.value=='') { alert('请输入用户名'); document.frmcomment.cusername.focus(); return false; } if (document.frmcomment.commenttitle.value=='') { alert('请输入标题'); document.frmcomment.commenttitle.focus(); return false; } if (document.frmcomment.Message.value=='') { alert('请输入内容'); document.frmcomment.Message.focus(); return false; } if (document.frmcomment.code.value=='') { alert('请输入验证码'); document.frmcomment.code.focus(); return false; } return true; }