方式一
<td><a href="javascript:;">Delete</a></td>
方式二
函数的返回值为false
allA[i].onclick = function(){var tr = this.parentNode.parentNode;//var name = tr.getElementsByTagName("td")[0].innerHTML;var name = tr.children[0].innerHTML;var flag = confirm("确认删除"+name+"吗?");if(flag){tr.parentNode.removeChild(tr);}return false;};