<script>
var currRowIndex = 0;
function del(objTD)
{
var objTR =objTD.parentElement.parentElement;
currRowIndex= objTR.rowIndex;
alert(currRowIndex);
var objTable = document.getElementById("t");
if(confirm("确定删除?"))
{
objTable.deleteRow(currRowIndex);
currRowIndex = 0;
}
}
</script><table id="t"><tr id=a1>
<td>1111</td>
<td>
<button type="button" name="b1" onClick="del(this)">del</button>
</td>
</tr><tr id=a2>
<td>222222222</td>
<td>
<button type="button" name="b2" onClick="del(this)">del</button>
</td>
</tr><tr id=a3>
<td>3333333333</td>
<td>
<button type="button" name="b3" onClick="del(this)">del</button>
</td>
</tr>
</table>
var currRowIndex = 0;
function del(objTD)
{
var objTR =objTD.parentElement.parentElement;
currRowIndex= objTR.rowIndex;
alert(currRowIndex);
var objTable = document.getElementById("t");
if(confirm("确定删除?"))
{
objTable.deleteRow(currRowIndex);
currRowIndex = 0;
}
}
</script><table id="t"><tr id=a1>
<td>1111</td>
<td>
<button type="button" name="b1" onClick="del(this)">del</button>
</td>
</tr><tr id=a2>
<td>222222222</td>
<td>
<button type="button" name="b2" onClick="del(this)">del</button>
</td>
</tr><tr id=a3>
<td>3333333333</td>
<td>
<button type="button" name="b3" onClick="del(this)">del</button>
</td>
</tr>
</table>
var currRowIndex = 0;
function del(objTD)
{
var objTR =objTD.parentNode.parentNode;
currRowIndex= objTR.rowIndex;
if(confirm("确定删除?"))
{
objTR.parentNode.deleteRow(currRowIndex);
currRowIndex = 0;
}
}
</script><table id="t"><tr id=a1>
<td>1111</td>
<td>
<button type="button" name="b1" onClick="del(this)">del</button>
</td>
</tr><tr id=a2>
<td>222222222</td>
<td>
<button type="button" name="b2" onClick="del(this)">del</button>
</td>
</tr><tr id=a3>
<td>3333333333</td>
<td>
<button type="button" name="b3" onClick="del(this)">del</button>
</td>
</tr>
</table>
<head>
<title></title>
<script type="text/javascript">
function Goto(){}
function deleteCurrentRow(obj){
var tr=obj.parentNode.parentNode;
var tbody=tr.parentNode;
tbody.removeChild(tr);
}
</script>
</head>
<body>
<table cellspacing="0" rules="all" bordercolor="#CCCCCC" border="1" id="dgFlowList" style="border-color:#CCCCCC;border-width:1px;border-style:solid;width:98%;border-collapse:collapse;MARGIN: 5px 0px">
<tr class="DataGrid_HeaderStyle" nowrap="nowrap" align="Center">
<td>流程名称</td><td>表单名称</td><td>上传附件</td><td>操作</td>
</tr>
<tr>
<td style="width:35%;">请假单1</td>
<td style="width:35%;">请假单</td>
<td align="Center" style="width:10%;">不允许</td>
<td align="Center" style="width:20%;">
<a href="javascript:Goto();" onclick='{if(confirm("确定要删除【请假单1】这个流程吗?")) {deleteCurrentRow(this); }else {}}'>删除</a>
</td>
</tr>
<tr>
<td style="width:35%;">请假单2</td>
<td style="width:35%;">请假单</td>
<td align="Center" style="width:10%;">不允许</td>
<td align="Center" style="width:20%;">
<a href="javascript:Goto();" onclick='{if(confirm("确定要删除【请假单2】这个流程吗?")) {deleteCurrentRow(this); }else {}}'>删除</a>
</td>
</tr>
<tr>
<td style="width:35%;">请假单3</td>
<td style="width:35%;">请假单</td>
<td align="Center" style="width:10%;">不允许</td>
<td align="Center" style="width:20%;">
<a href="javascript:Goto();" onclick='{if(confirm("确定要删除【请假单3】这个流程吗?")) {deleteCurrentRow(this); }else {}}'>删除</a>
</td>
</tr>
<tr>
<td style="width:35%;">请假单4</td>
<td style="width:35%;">请假单</td>
<td align="Center" style="width:10%;">不允许</td>
<td align="Center" style="width:20%;">
<a href="javascript:Goto();" onclick='{if(confirm("确定要删除【请假单4】这个流程吗?")) {deleteCurrentRow(this); }else {}}'>删除</a>
</td>
</tr>
</table>
</body>
</html>