var tab=document.getElementById("table1"); tab.rows;// 有值 var tab1=("#table1"); tab1.rows; //undefined