在html中加入
<script language="javascript">
function selectall()
{
var arrobj=document.all;
if(document.form1.checkedall.checked)
{
for(var i=0;i<arrobj.length;i++)
{
if(typeof arrobj[i].type != "undefined" && arrobj[i].type=='checkbox')
{