下面的代码如何转为JAVASCRIPT呀?谢谢!
大虾,帮帮忙.谢啦!
我是菜鸟,我怕谁.
if Pos('.HTM', AnsiUpperCase(PChar(ExtractFileName(AFileName)))) > 0 then
begin
if nbContent.ActivePage <> 'Htm' then nbContent.ActivePage := 'Htm';
if FullScreen.nbContent.ActivePage <> 'Htm' then
FullScreen.nbContent.ActivePage := 'Htm';
if Flash <> nil then FreeAndNil(Flash);
AFileName := StringReplace(AFileName, '/', '\', [rfReplaceAll]);
if SpanName <> '' then begin
repeat
Application.ProcessMessages ;
until not wbHtml.Busy;
Doc:=wbHtml.Document as IHTMLDocument2;
try
if PreLabel <> '' then begin
spDisp := Doc.all.item(PreLabel,emptyParam);
if SUCCEEDED(spDisp.QueryInterface(IHTMLElement, anchor))then
anchor.style.color := PreColor;
end;
except
end;
try
PreLabel := SpanName;
spDisp := Doc.all.item(SpanName,emptyParam);
if SUCCEEDED(spDisp.QueryInterface(IHTMLElement, anchor))then
begin
PreColor := anchor.style.color ;
anchor.style.color := 'red';
end;
except
end;
end else wbHtml.Navigate(AFileName);