javascript ,java,J2EE ,JSP页面上的这段实现直接删除的JS代码 什么意思,解释一下 看不懂猛的、
functiondelData(value_){alert("删除功能提示");vareventObj=event.srcElement;vartrObj=eventOb...
function delData(value_) {
alert("删除功能提示");
var eventObj = event.srcElement;
var trObj = eventObj.parentElement.parentElement;
var tableObj = trObj.parentElement.parentElement;
var trIndex = trObj.rowIndex;
tableObj.deleteRow(trIndex);
var aimObj = document.getElementById('resource_list');
if (aimObj == null || aimObj == undefined) {
alert("select标签不存在!");
return;
}
var optionContain = aimObj.options;
var tmpValue = null;
for (i = 0; i < optionContain.length; i++) {
v_tmp = optionContain[i].value.replace(/\\/g, '');
if (v_tmp.length == value_.length && v_tmp == value_) {
delOption('resource_list', optionContain[i].index);
break;
}
}
这代码是覆盖在JSP页面上的 展开
alert("删除功能提示");
var eventObj = event.srcElement;
var trObj = eventObj.parentElement.parentElement;
var tableObj = trObj.parentElement.parentElement;
var trIndex = trObj.rowIndex;
tableObj.deleteRow(trIndex);
var aimObj = document.getElementById('resource_list');
if (aimObj == null || aimObj == undefined) {
alert("select标签不存在!");
return;
}
var optionContain = aimObj.options;
var tmpValue = null;
for (i = 0; i < optionContain.length; i++) {
v_tmp = optionContain[i].value.replace(/\\/g, '');
if (v_tmp.length == value_.length && v_tmp == value_) {
delOption('resource_list', optionContain[i].index);
break;
}
}
这代码是覆盖在JSP页面上的 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询