问题描述
大家好,我有一个aspx格式的gridview,为了使用日历,我将javascript函数绑定到了NavigateURL,以便我们可以运行javascript代码.
javascript函数正常运行,但我需要在javascript函数末尾刷新页面
我该怎么做
问候
需要什么来刷新父窗口而不是当前窗体的id,使javascript还包含一个日历窗体,并且不需要刷新它,我们需要刷新在javascript函数中调用的父窗体
Hi everybody, I have a gridview in aspx form, in order to use a calender I binded a javascript function to a NavigateURL, so that we can run javascript code.
The javascript function is running normlly but what i need is to refresh the page at the end of the javascript function
HOw could I do this
Regards
what is needed id to refresh the parent window not the current form, sinve the javascript also contains a calender form and tno need to refresh it, we need to refresh the parent form which we called in the javascript function
推荐答案
location.reload(true);
已更新-由于您更改了问题,因此这里的答案已更新.使用以下代码.
Updated - Since you changed the Question, here is updated answer. Use below code.
window.opener.location.href = window.opener.location.href;
这篇关于运行JavaScript代码后刷新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!