<script type="text/javascript" language="javascript">
function getkey() {
location.href = "MarketQueryInternInfo?key=" + document.getElementById('txtSearch').value;
}
//搜索方法
function allChecked() {
var all = document.getElementsByName("checkbox");
var len = all.length;
for (var i = 0; i <= len - 1; i++) {
all[i].checked = true;
}
}//全選方法
function allUnCheck() {
var all = document.getElementsByName("checkbox");
var len = all.length;
for (var i = 0; i <= len - 1; i++) {
all[i].checked = false;
}
}
//取消全選方法
function getcheckbox() {
var somchechk = document.getElementsByName("checkbox");
var j = 0;
var checkArray = new Array();
for (var i = 0; i <= somchechk.length - 1; i++) {
if (somchechk[i].checked) {
checkArray[j] = somchechk[i].value;
j++;
}
}
return checkArray;
} //獲得部分選擇方法
function delete(obj) {
if (obj == -1) {
var strArray = getcheckbox();
if (strArray != "") {
location.href = "../Home/DelInternBaseInfo?Array=" + strArray;
}
}
//刪除方法
}
<input type="checkbox" name="checkbox" onclick ="if(this.checked==true){ allChecked();}else{allUnCheck();}" />
<td height="18" bgcolor="#FFFFFF"><div align="center" class="STYLE2 STYLE1"><input name="checkbox" type="checkbox" class="STYLE2" value="<%=Html.Encode(item .InternID) %>"/></div></td>
<td height="18" bgcolor="#FFFFFF"><div align="center"><img src="../../../../images/037.gif" width="9" height="9" /><span class="STYLE1"> [</span><a href="javascript:delete(-1)" onclick="return confirm('確定刪除此數(shù)據(jù)嗎?')">刪除</a><span class="STYLE1">]</span></div></td>
public ActionResult DelInternBaseInfo(string array)
{
try
{
string[] getstr = array.Split(',');
for (int i = 0; i <= getstr.Length-1; i++)
{
string id = getstr[i];
interns.DeleteIntern(id);
}
return RedirectToAction("../QueryIntern/MarketQueryInternInfo");
}
catch
{
return View("../QueryIntern/MarketQueryInternInfo");
}
}
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請
點(diǎn)擊舉報(bào)。