简体   繁体   English

更改innerhtml,但页面未显示新的innerhtml

[英]changing innerhtml but page does not display new innerhtml

In an application that I am working on, on page load, I set innerhtml and the page displays correctly. 在我正在处理的应用程序中,在页面加载时,我设置了innerhtml,页面显示正确。 I have a radio button on my page that when hit, the innerhtml is changed. 我的页面上有一个单选按钮,单击该按钮时,innerhtml会更改。 The new change to the innerhtml does not display on the page.I know that my new innerhtml is being changed due to setting tracepoints and debugging but the old values still stay in my table. 对innerhtml的新更改未显示在页面上。我知道由于设置跟踪点和调试而更改了我的新innerhtml,但是旧值仍然保留在我的表中。 is there something i need to call to refresh with the new html (i do not want the page to refresh, but the data in my table)? 我需要调用一些东西来用新的html刷新(我不希望页面刷新,但是我表中的数据)吗? Page load calls LoadDashboardTree - and the table displays correctly. 页面加载调用LoadDashboardTree-并且表正确显示。 The javascript action of my radio buttons call the correct sub depending on the value of the radio button selected, I can tell that when I hit the radio button to call loadDashboardTreeDays that it is calling this because I have set tracepoints in this and it does go through, just the table never refreshes. 我的单选按钮的javascript操作会根据所选单选按钮的值来调用正确的子项,我可以告诉我,当我按下单选按钮以调用loadDashboardTreeDays时,它正在调用此函数,因为我已经在其中设置了跟踪点并且它确实执行了通过,只是表永远不会刷新。 divsummary inner html does not refresh either but it is not needed as both days and non days do the same thing, so it still is displaying correctly and picking up the onclick divsummary内部html也不刷新,但由于天和非天都执行相同的操作,因此不需要刷新,因此它仍然可以正确显示并拾取onclick

    Public Sub LoadDashboardTree(ByVal Id, ByVal Cat, ByVal Type, ByVal ExplodeTo)
    div027.InnerHtml = LoadChild(Id, Cat, Type, ExplodeTo)
    divSummary.InnerHtml = LoadSummary(Id, Cat, Type)
End Sub

Public Sub LoadDashboardTreeDays(ByVal Id, ByVal Cat, ByVal Type, ByVal ExplodeTo)
    div027.InnerHtml = LoadChildDays(Id, Cat, Type, ExplodeTo)
    divSummary.InnerHtml = LoadSummaryDays(Id, Cat, Type)
End Sub

edit- this is the call to change the innerHTML from my aspx.vb page - not the actual javascript portion of the page, for those who could not tell 编辑-这是从我的aspx.vb页面更改innerHTML的调用-对于那些无法分辨的人,不是页面的实际javascript部分

No, there is nothing that you need to do to refresh the display. 不,您无需执行任何操作即可刷新显示。 If you set the innerHTML property, it will update the element. 如果设置innerHTML属性,它将更新元素。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM