在数据库中插入数据后,无法重定向到 HTML 页面
after insert data in database not able to redirect to html page?
$("#rec").click( function() {
$.post($("#ne").attr("action"), $("#ne :input").serializeArray(), function(info) {
$("#out").html(desc);
});
});
$("#ne").submit(function() {
return false;
});
rec
是 HTML 表单的 id,out
是与表单位于同一页面的 span 标签的 id,插入记录后我无法重定向?
你可以使用它
window.location.reload();
或
window.location = "add your link here";
或
$(this).attr("href","add your page link here");
或
window.location.replace("add your page link here");
使用此方法
与 HTTP 重定向类似的行为
window.location.replace("http://yoursite.com");
与点击链接类似的行为
window.location.href = "http://yoursite.com";
相关文章:
- 通过javascript重定向html传递php变量
- 使用angular重定向到html页面
- 如何在chrome扩展中重定向到html页面
- 使用ajax进行HTML重定向
- 如何重定向到我的html网站youtube嵌入视频打开在youtube应用程序
- 重定向到Angular JS中的另一个HTML页面
- 使用JavaScript制作动态HTML页面以重定向到URL
- 张贴HTML表单后重定向
- HTML表单重定向
- 按钮don't使用onClick-Javascript HTML重定向
- 如何防止 swf 重定向父 html
- 在Kentico中使用response.write重定向HTML表单不起作用
- 如果错误,如何防止页面重定向?(HTML/JavaScript)
- 如果不登录,则重定向 HTML 页面
- 提交表单后重定向(HTML,PHP)
- 正在更改重定向HTML代码以在同一窗口中打开
- 重定向HTML.BeginForm MVC 4的问题
- 用javascript重定向html页面
- 当填充输入成功时重定向html
- 如何重定向HTML表单提交到iframe