小问题多送分,先来先得 FORM的提交方式用get试试你的逻辑有问题吧提交一次了 怎么还提交? 你要干嘛?弹出的那个对话框是你deletepage.aspx页面里用了回退的JS吧? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 // 在首次提交之前clone一个BiaoDan,比如命名为ClonedBiaoDanif(confirm("您确认删除所有选中的数据?")) { document.BiaoDan.action= "deletepage.aspx"; document.BiaoDan.submit(); // 用ClonedBiaoDan替换掉BiaoDan document.BiaoDan.action="viewpage.aspx"; window.location.reload(); } <meta http-equiv="Pragma" contect="no-cache">是用于设定禁止浏览器从本地机的缓存中调阅页面内容,设定后一旦离开网页就无法从Cache中再调出; <meta http-equiv="set-cookie" contect="Mon,12 May 2001 00:20:00 GMT">cookie设定,如果网页过期,存盘的cookie将被删除。需要注意的也是必须使用GMT时间格式; 有没有设置这些啊 window.location.reload(true); 试试 window.location.reload(true); 这个方法也不行啊 有没有高手帮帮忙啊 用response.write("<script>window.location.href=window.location.href</script>")就行 好像也不行啊 整个页面是框架组成的 这个document.BiaoDan.action="viewpage.aspx";就是转到右面的那个页面 document.BiaoDan.action= "deletepage.aspx";这个是从当前页面转到删除的处理页面,然后 document.BiaoDan.submit();提交,提交之后document.BiaoDan.action="viewpage.aspx";就是转到一个xml文件的解析页面,解析出来的就是当前的页面,然后刷新当前页面的话就会出现“重试 取消”的提示框,怎么把这个提示框在js中给屏蔽了回答出来在追加100分...等待高手 document.BiaoDan.submit();当你完成删除之后,直接在后台里转向到viewpage.aspx吧没有必要再前台转一次了如果还是想转的话,你可以在后台调用你当前面里的一下js模型如下if(confirm("您确认删除所有选中的数据?")) { document.BiaoDan.action= "deletepage.aspx"; document.BiaoDan.submit(); }//后台里完成删除后调用前面的jsfunction tt(flag){ if(flag){ // 用ClonedBiaoDan替换掉BiaoDan document.BiaoDan.action="viewpage.aspx"; window.location.reload(); }} 你的提示框不会是指这个吧confirm("您确认删除所有选中的数据?") 你的处理有问题 document.BiaoDan.action="deletepage.aspx"; document.BiaoDan.submit();上面这个操作的结果会更新当前的页面.我想你可能只是想做一人 删除操作,并不想更新当前页面吧.那个你可以有以下几种选择.(1) 将form的target指向其它的frame或者窗口.避免当前页面的刷新.可以使用隐藏的frame.(2) 使用ajax进行异步的操作.(3) 服务器端处理后,重定向,指向你希望的页面.(这个操作会刷新页面影响后续的处理 ); document.BiaoDan.action="viewpage.aspx"; window.location.reload(); 看不懂设置form的action和reload有什么关系.实际上这个地方设置action不会影响画面的reload.无沦你选择上面哪种处理方式,这个地方的处理都是多余的. 如果不reload的话,操作完成后当前的页面就会显示一个空白页面... 你设置了2个action是不对的吧,不能加个条件吗? <html><head></head><script language="javascript">function test(form){ with( form ){ target="iframe1"; action="XXXXXXXX.asp?XXXXXXX"; return(true); }}</script><body> <form id="form1" action="#" onsubmit="test(this)"> <input type="text" name="text1" value=""> <input type="submit" value="submit"> </form> <iframe name="iframe1" id="iframe1" style="width:0px;height:0px;border:0px;"> </iframe></body></html> function deleteSelected(){ if (arguments[0] != null && arguments[0].length > 0) { document.getElementById("ChuFaJ").value=arguments[0]; } if(document.BiaoDan.XuanZhongZ.value.length < 1) { alert('请至少选择一行!') return; } if(confirm("您确认删除所有选中的数据?")) { formToAnotherTwo("deletepage.aspx"); } else { return; } }function formToAnotherTwo(targetPage) { document.BiaoDan.action= targetPage; window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no"); document.BiaoDan.target="ceshi"; document.BiaoDan.submit(); document.BiaoDan.action="viewpage.aspx"; document.BiaoDan.target=""; }deletepage.aspx这个页面是删除的处理页面viewpage.aspx这个页面是解析xml文件的,解析出来的就是当前的查询页面整个过程就是点删除的时候先进入deletepage.aspx这个处理页面,完了之后要到viewpage.aspx页面去重新解析一下xml文件然后显示出来 function formToAnotherTwo(targetPage) { document.BiaoDan.action= targetPage; window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no"); document.BiaoDan.target="ceshi"; document.BiaoDan.submit(); /*document.BiaoDan.action="viewpage.aspx"; document.BiaoDan.target=""; */ }你在deletepage.aspx执行删除完后输出js控制父页刷新试试,你设置表单的action没什么意义啊,如果刷新了页面,表单的action就变为原来设置的了不知道是不是这个意思??deletepage.aspx/*执行删除的代码*///输出js设置父页的url为viewpage.aspxResponse.Write("<script>parent.location='viewpage.aspx';</"+"script>"); function formToAnotherTwo(targetPage) { document.BiaoDan.action= targetPage; window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no"); document.BiaoDan.target="ceshi"; document.BiaoDan.submit(); document.BiaoDan.action="viewpage.aspx"; document.BiaoDan.target=""; return( false );}下面这两句有用吗?document.BiaoDan.action="viewpage.aspx"; document.BiaoDan.target=""; 如果有用的话,别忘记在后边加上一句 return( false );因为这是onsumbit的影响函数,你不返回false的话,还是会被默认提交一次的。 对了补充一句,如果下面这两句没用的话,那个sumbit()也就不需要写了,document.BiaoDan.action="viewpage.aspx"; document.BiaoDan.target="";你可以这么写。function formToAnotherTwo(targetPage) { document.BiaoDan.action= targetPage; window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no"); document.BiaoDan.target="ceshi"; } 后台del页面里写response.write(" <script>BiaoDan.location.href='viewpage.aspx' </"+"script>") window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no"); 这句是为了什么?希望在提交的同时,打开一个窗口吗?按照20楼的改法,你会得到这样的结果。(1) 使用window.open打开一个。(2) 提交表单到服务器,并将返回的结果显示到隐藏的frame中。 猜想你想要的结果是function formToAnotherTwo(targetPage) { document.BiaoDan.action= targetPage; document.BiaoDan.target="ceshi"; } function formToAnotherTwo(targetPage) { document.BiaoDan.action= targetPage; document.BiaoDan.target="ceshi"; } 不document.BiaoDan.submit(); 怎么提交啊.. JScript codefunctionformToAnotherTwo(targetPage) { document.BiaoDan.action=targetPage; document.BiaoDan.target="ceshi"; document.BiaoDan.submit(); document.BiaoDan.action="viewpage.aspx"; document.BiaoDan.target="";return(false);}把那句 window.open( .... ) 删除掉。有它当然会闪了。预先在画面中放置一下 name = "ceshi"的隐藏iframe。 jquery的bug? HTML源代码替换 谁能帮我去掉一个就jvascript的导航条的购买提示窗口 锁定页面 关于easyUI datagrid 一列中多个checkbox的问题 ListBox (WebControl) 多选模式下的定位问题(yuky_xm) 问个极菜的问题!!! 我要用js语句取得 radio 选框的值。 关于CHECKBOX控制文本框的问题 JS访问JAVA变量 看了一个例子有些地方不明白 像这样的语句能不能换一种写法啊?
// 在首次提交之前clone一个BiaoDan,比如命名为ClonedBiaoDan
if(confirm("您确认删除所有选中的数据?")) {
document.BiaoDan.action= "deletepage.aspx";
document.BiaoDan.submit();
// 用ClonedBiaoDan替换掉BiaoDan
document.BiaoDan.action="viewpage.aspx";
window.location.reload();
}
是用于设定禁止浏览器从本地机的缓存中调阅页面内容,设定后一旦离开网页就无法从Cache中再调出; <meta http-equiv="set-cookie" contect="Mon,12 May 2001 00:20:00 GMT">
cookie设定,如果网页过期,存盘的cookie将被删除。需要注意的也是必须使用GMT时间格式; 有没有设置这些啊
试试
这个方法也不行啊 有没有高手帮帮忙啊
这个document.BiaoDan.action="viewpage.aspx";
就是转到右面的那个页面
这个是从当前页面转到删除的处理页面,
然后 document.BiaoDan.submit();提交,
提交之后document.BiaoDan.action="viewpage.aspx";
就是转到一个xml文件的解析页面,解析出来的就是当前的页面,
然后刷新当前页面的话就会出现“重试 取消”的提示框,
怎么把这个提示框在js中给屏蔽了回答出来在追加100分...等待高手
当你完成删除之后,直接在后台里转向到viewpage.aspx吧
没有必要再前台转一次了如果还是想转的话,你可以在后台调用你当前面里的一下js
模型如下
if(confirm("您确认删除所有选中的数据?")) {
document.BiaoDan.action= "deletepage.aspx";
document.BiaoDan.submit();
}//后台里完成删除后调用前面的js
function tt(flag){
if(flag){
// 用ClonedBiaoDan替换掉BiaoDan
document.BiaoDan.action="viewpage.aspx";
window.location.reload();
}
}
document.BiaoDan.submit();
上面这个操作的结果会更新当前的页面.
我想你可能只是想做一人 删除操作,并不想更新当前页面吧.
那个你可以有以下几种选择.
(1) 将form的target指向其它的frame或者窗口.避免当前页面的刷新.
可以使用隐藏的frame.(2) 使用ajax进行异步的操作.
(3) 服务器端处理后,重定向,指向你希望的页面.(这个操作会刷新页面影响后续的处理 );
document.BiaoDan.action="viewpage.aspx";
window.location.reload(); 看不懂设置form的action和reload有什么关系.
实际上这个地方设置action不会影响画面的reload.
无沦你选择上面哪种处理方式,这个地方的处理都是多余的.
<head>
</head>
<script language="javascript">
function test(form){
with( form ){
target="iframe1";
action="XXXXXXXX.asp?XXXXXXX";
return(true);
}
}
</script>
<body>
<form id="form1" action="#" onsubmit="test(this)">
<input type="text" name="text1" value="">
<input type="submit" value="submit">
</form>
<iframe name="iframe1" id="iframe1" style="width:0px;height:0px;border:0px;">
</iframe>
</body>
</html>
function deleteSelected()
{
if (arguments[0] != null && arguments[0].length > 0)
{
document.getElementById("ChuFaJ").value=arguments[0];
}
if(document.BiaoDan.XuanZhongZ.value.length < 1)
{
alert('请至少选择一行!')
return;
}
if(confirm("您确认删除所有选中的数据?"))
{
formToAnotherTwo("deletepage.aspx");
}
else
{
return;
}
}
function formToAnotherTwo(targetPage)
{
document.BiaoDan.action= targetPage;
window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
document.BiaoDan.target="ceshi";
document.BiaoDan.submit();
document.BiaoDan.action="viewpage.aspx";
document.BiaoDan.target="";
}deletepage.aspx这个页面是删除的处理页面
viewpage.aspx这个页面是解析xml文件的,解析出来的就是当前的查询页面
整个过程就是点删除的时候先进入deletepage.aspx这个处理页面,
完了之后要到viewpage.aspx页面去重新解析一下xml文件然后显示出来
{
document.BiaoDan.action= targetPage;
window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
document.BiaoDan.target="ceshi";
document.BiaoDan.submit();
/*document.BiaoDan.action="viewpage.aspx";
document.BiaoDan.target=""; */
}你在deletepage.aspx执行删除完后输出js控制父页刷新试试,你设置表单的action没什么意义啊,如果刷新了页面,表单的action就变为原来设置的了不知道是不是这个意思??deletepage.aspx
/*执行删除的代码*///输出js设置父页的url为viewpage.aspx
Response.Write("<script>parent.location='viewpage.aspx';</"+"script>");
document.BiaoDan.action= targetPage;
window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
document.BiaoDan.target="ceshi";
document.BiaoDan.submit();
document.BiaoDan.action="viewpage.aspx";
document.BiaoDan.target="";
return( false );
}
下面这两句有用吗?document.BiaoDan.action="viewpage.aspx";
document.BiaoDan.target=""; 如果有用的话,别忘记在后边加上一句 return( false );
因为这是onsumbit的影响函数,
你不返回false的话,
还是会被默认提交一次的。
如果下面这两句没用的话,
那个sumbit()也就不需要写了,
document.BiaoDan.action="viewpage.aspx";
document.BiaoDan.target="";你可以这么写。function formToAnotherTwo(targetPage) {
document.BiaoDan.action= targetPage;
window.open("","ceshi","width=600,height=400,top=200,left=220,toolbar=no,menubar=no,scrollbars=yes,resizable=no,location=no,status=no");
document.BiaoDan.target="ceshi";
}
response.write(" <script>BiaoDan.location.href='viewpage.aspx' </"+"script>")
希望在提交的同时,打开一个窗口吗?按照20楼的改法,
你会得到这样的结果。(1) 使用window.open打开一个。
(2) 提交表单到服务器,并将返回的结果显示到隐藏的frame中。
document.BiaoDan.action= targetPage;
document.BiaoDan.target="ceshi";
}
document.BiaoDan.action= targetPage;
document.BiaoDan.target="ceshi";
}
document.BiaoDan.action=targetPage;
document.BiaoDan.target="ceshi";
document.BiaoDan.submit();
document.BiaoDan.action="viewpage.aspx";
document.BiaoDan.target="";return(false);
}
把那句 window.open( .... ) 删除掉。
有它当然会闪了。
预先在画面中放置一下 name = "ceshi"的隐藏iframe。