问一下,在打印那个连接中,怎么把表中第三排的名字用alert打印出来
<title> 无标题文档 </title>
</head>
<script language= "javascript ">
function chackall()
{
var mycheckArray=abc.mycheckbox;
for(i=0;i <mycheckArray.length;i++)
if(mycheckArray[i].checked==false)
mycheckArray[i].checked=true;
}
function delchackall()
{
var mycheckArray=abc.mycheckbox;
for(i=0;i <mycheckArray.length;i++)
if(mycheckArray[i].checked==true)
mycheckArray[i].checked=false;
else
mycheckArray[i].checked=true;
}
function nochackall()
{
var mycheckArray=abc.mycheckbox;
for(i=0;i <mycheckArray.length;i++)
if(mycheckArray[i].checked==true)
mycheckArray[i].checked=false;
}
function printer()
{
var mycheckArray=abc.mycheckbox;
var mytable=abc.yuan.abc
var no=0;
for (i=0;i <mycheckArray.length;i++)
if(mycheckArray[i].checked==true)
for(i=0;i <mytable.length;i++)
no=mytable[i].value
alert(no+ "/n ")
}
</script>
<body>
<form name= "abc ">
<table width= "368 " height= "189 " border= "1 " name= "yuan ">
<tr>
<td> <input type= "checkbox " name= "mycheckbox " value= "1 "> </td>
<td> 1 </td>
<td name= "eee "> 袁 </td>
</tr>
<tr>
<td> <input type= "checkbox " name= "mycheckbox " value= "2 "> </td>
<td> 2 </td>
<td name= "eee "> 浩 </td>
</tr>
<tr>
<td> <input type= "checkbox " name= "mycheckbox " value= "3 "> </td>
<td> 3 </td>
<td name= "eee "> 琳 </td>
</tr>
<tr>
<td colspan=3>
<a href= "# " onclick= "chackall() " style= "cursor:hand "> 全选 </a>
<a href= "# " onclick= "delchackall() " style= "cursor:hand "> 反选 </a>
<a href= "# " onclick= "nochackall() " style= "cursor:hand "> 全不选 </a>
<a href= "# " onclick= "printer() " style= "cursor:hand "> 打印 </a>
</td>
</tr>
</table>
</form>
</body>
</html>
其它都是对的,只有打印的那个连接是错的
------解决方案-------------------- <TD> 没有name属性,用id吧