if(tb.rows.length>2)
    
{
        
var row = tb.rows.length;
        alert(row);
        
//如果只有一条数据
         if(row == 3)
             
{
                 
if(document.all.SPBM.value=="00")
                 
{
                     
//alert(document.all.SPBM.value);
                     alert("请录入发票信息");
                 }

             }

        
//如果不止一条数据
        if(row>3)
        
{
            
for(i=0;i<row-2;i++)
             
{
            
if(tb.rows[i+1].cells[0].children.item(0).value=="00")
             
{
               alert(
"请选择品名!");
                
return false;
             }

          }

        }

    }