数据提交成功用alert提示,但页面立马就重载了 alert("提交成功!"); window.location.reload(); 如何避免? 方法一: setTimeout 延迟3秒效果: alert('提交成功!'); setTimeout(function () { window.location.reload(); }, 3000); 方法二: (在w3School测试有效,但是在项目中测试还是立马刷新...) new Promise(function (resolve, r…
原文地址:http://www.cnblogs.com/chenghu/p/3696433.html 后台提交成功后 关闭当前页 并刷新父窗体 this.ClientScript.RegisterStartupScript(this.GetType(), "message", "<script language='javascript' defer>alert('提交成功');if (window.opener && !window.opener.…
后台提交成功后 关闭当前页 并刷新父窗体 this.ClientScript.RegisterStartupScript(this.GetType(), "message", "<script language='javascript' defer>alert('提交成功');if (window.opener && !window.opener.closed) { window.opener.location.href = window.open…
我们在用dedecms自定义表单提交成功后提示信息一般是"Dedecms 提示信息",这个要怎么改成自己想要的文字呢?还有就是提示页停留时间,目前估计就2秒,太快了,要如何设置长点呢?通过下面我们就来一起修改一下 打开/include/common.func.php,大概在266行,改成自己的想要的文字,比如“您已经注册成功”. 自动跳转时间设为20秒,大概在237行,数字改为20000,如下面代码中的红色部分 : $limittime); $func = ''; if($gourl=…
织梦的自定义表单制作的留言,报名等功能,提交成功后会自动返回到首页,那么如何让它返回到当前页面呢? 方法如下: 打开plus/diy.php文件 找到 showmsg($bkmsg, $goto); 改成 showmsg($bkmsg, -1); 这样就ok了,赶紧试试吧.…
废话不说先看图:  代码实现: 前台代码: {% load staticfiles %} <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>项目列表</title> <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.…
如题: 在项目中要在当前页面中,再新开一个页面, 新开页面的地址是ajax请求后返回的url --------- 试了,浏览器提示组织弹窗..... 网上找,找到了一个处理方式,思路是 1. 先打开一个标签新页, 如: var newWin = window.open("loading.html", "_blank"); 2. ajax 请求,成功, 把标签页地址设置为接口返回的地址 newWin.location.href = "api/url/do.h…
0 前台: 'type'        : 'post', 'contentType' : 'application/json;charset=UTF-8', 'data'        : JSON.stringify(JsonObject), 其中JsonObject就是你组装的JSON对象 后台: @RequestMapping(value = "/query", method = RequestMethod.POST) @ResponseBody public Map quer…
以前介绍过ajax提交方式.但仅仅是个例子,今天将详细介绍jquery中的$.ajax,$.get,$.post方法. 一,首先介绍$.ajax方法参数(以下参数来自:http://www.cnblogs.com/tylerdonet/p/3520862.html) 1.url: 要求为String类型的参数,(默认为当前页地址)发送请求的地址. 2.type: 要求为String类型的参数,请求方式(post或get)默认为get.注意其他http请求方法,例如put和delete也可以使用,…
加载中,请等待div: <div id="load" class="center-in-center" style="display:none;"> <img src="../resources/images/loader.gif" />加载中,请等待... </div> 确定重置按钮: <div class="form-group row"> <div…