首页 文章

如何在wordpress中提交表单后刷新页面[关闭]

提问于
浏览
-3

如何在word press中提交表单后刷新页面 . 首先我尝试了location.reload();我从搜索引擎得到的更多例子但没有任何效果 . 我试图通过id也取消文本字段 . 下面是我试过的代码 . 谁能帮我??

  • 姓名电子邮件电话否地址主题消息在此处输入代码有关我们的教区联系人的信息:单击此处

  • //

window.history.forward(1); function noBack(){window.history.forward(); } - >

2 回答

  • 1
    <a href="" OnClick="window.close()">Close Window</a>
    

    如果你想在一段时间后关闭它...

    添加 onLoad="setTimeout('window.close()', 5000);

  • 1

    你试过JavaScript吗? How to close current tab in a browser window?

    <a href="blablabla" onclick="setTimeout(function(){var ww = window.open(window.location, '_self'); ww.close(); }, 1000);">
        If you click on this the window will be closed after 1000ms
    </a>
    

    或者也许jQuery呢? How to capture the browser window close event?

相关问题