var inputs= document.getElementById("<% =GridView1.ClientID >").getElementsByTagName("input");
for(int i=0;i < inputs.legth;i ++)
{
alert(inputs[i].value);
}
原文:http://www.cnblogs.com/feilign/p/4151693.html