_self works for me,
1. make sure yz_create.jsp exists
2. try to change
window.open("yz_create.jsp?grpId="+Id+"&action=del","_self");
===>
window.location.href = "yz_create.jsp?grpId="+Id+"&action=del";
1. make sure yz_create.jsp exists
2. try to change
window.open("yz_create.jsp?grpId="+Id+"&action=del","_self");
===>
window.location.href = "yz_create.jsp?grpId="+Id+"&action=del";
window.open("yz_create.jsp?grpId="+Id+"&action=del");
window.open("yz_create.jsp?grpId="+Id+"&action=del","_self");
后面加
window.event.returnValue=false;
window.open("yz_create.jsp?grpId="+Id+"&action=del","_self");必须带有"_self"参数,这样我才可以在删除指定记录后,仍在jsp页面中显示
未被删除的记录。
我经常使用window.open("*.jsp","_self")方法,但这次我在Bean里生成
的调用 javascript函数的语句,却发现无效,大家快想想会是为什么呢?
Bean 中语句如下:
strTable += "<tr><td><a href=# onclick=delConfirm('"+Id+"')>删除</a></td><td><a href=yz_create.jsp?grpId="+Id+"&action=modify>修改</a></td>";