我用IHtmlDocument2(WB1.Document).write写入HTML后可以正常显示,但是里边的脚本却不执行,也不报错,没有任何提示,什么原因??
procedure TForm1.insertHTML(htmlStr: WideString; act: Integer);
var
  tv: Variant;
begin
  if act=0 then
  begin
    tv := VarArrayCreate([0, 0], varVariant);
    tv[0] := htmlStr;
    IHtmlDocument2(WB1.Document).write(PSafeArray(TVarData(tv).VArray));
  end
  else if act=1 then
    IHtmlDocument2(WB1.Document).Body.innerHtml := IHtmlDocument2(WB1.Document).Body.innerHtml + htmlStr
  else
    IHtmlDocument2(WB1.Document).Body.innerHtml := '';
end;完整代码如上,第一步先用write写入HTML,第二步用innerHtml写入具体表格,但是第二步里调用第一步写入的脚本时却没有任何反应....