try:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="Javascript">
<!--
function check()
{
var arg=arguments
for(var i=0;i<arg.length;i+=2){
if (arg[i].value==""){
     window.parent.frames["bottomFrame"].document.writeln("<body bgcolor='#e4eedb' topmargin='0'>");
     window.parent.frames["bottomFrame"].document.writeln("<font color='red' size='2'><b>信息提示:</b></font><font size=2><b>"+arg[i+1]+"输入不能为空!</b></font>");
     window.parent.frames["bottomFrame"].document.close();
     arg[i].focus();
    return false;
    }
    }
    return true
}
//-->
</script></head><body bgcolor="#FFFFFF">
<form name="pMform">
规格:<input type="text" name="gg"><br>
名称:<input type="text" name="mg"><br>
      <input type="submit" name="Submit2" value="确定" onclick='return check(gg,"规格",mg,"名称")'>
</form>
</body>
</html>