我如何在 Smart Mobile Studio 中 reload/Refresh W3IFrameHtmlElement?

How do I reload/Refresh a W3IFrameHtmlElement in Smart Mobile Studio?

如何在 Smart Mobile Studio 中 reload/Refresh W3IFrameHtmlElement?

版本 2.2

当我第一次分配源 属性 时,效果很好。当我第二次或以后分配它时,它永远不会起作用

您可以尝试类似的方法:

W3IFrameHtmlElement1.Handle.contentWindow.location.reload(true);

直接访问基础 DOM 元素。使用这种方法,句柄之外的所有内容都需要区分大小写

如果您想在代码中实现类型安全(加上不区分大小写),您还可以将变体句柄强制转换为指定的专用 W3C class,如下所示:

JHTMLIFrameElement(W3IFrameHTMLElement1.Handle).contentWindow.location.reload;

请注意,您需要使用 W3C 单位。HTML5 为此:

uses W3C.HTML5;