.hta嵌入在iframe中

时间:2015-09-02 12:48:30

标签: html iframe vbscript hta

我有一个.hta程序,它有3个iframe,其中2个我希望嵌入其他.hta程序,其中一个包含excel表(虽然这有效)。 我运行我的程序时没有错误,但我想把hta程序放在空白的2个iframe。

我越快得到建议或答案就越好,谢谢。 顺便说一句我正在使用VBScript

<head>
<title>Test</title>

<HTA:APPLICATION
onload="Window_onload"
APPLICATIONNAME="FileGen"
SCROLL="no"
SINGLEINSTANCE="no"
MaximizeButton="no"
Border="thin"
version="1.0"
caption="yes"
>

</head>

<style type="text/css">
body 
{
    font-family: Arial; font-size: 8pt; background-color:#8A8A8A;
    margin:0;
}
input{ font-family: Arial; font-size: 8pt; background-color:#E6E6E6; }
</style>

<script LANGUAGE="VBScript">

'==========================================================
sub Window_onload
'======================================================
window.resizeTo 900,215
window.moveTo 0,0

'Declares FSO
set FSO = CreateObject("Scripting.FileSystemObject")

'Gets full path of folder
FullPath = FSO.GetAbsolutePathName(folderName) 

TFG = FullPath & "\Background\FileGen.html"
document.getElementById("frame1").srcdoc= CStr(TFG)

TGC = FullPath & "\Background\Graph_Control.html"
document.getElementById("frame2").srcdoc= CStr(TGC)

TDA = FullPath & "\Background\Data.xls"
document.getElementById("frame3").src= CStr(TDA)

End sub
</script>

<Body>

<div  >
    <iframe srcdoc=""   id=frame1 width=150 height=190 frameborder=1    scrolling=no  frameborder=0     ></iframe>
    <iframe srcdoc=""   id=frame2 width=150 height=190 frameborder=1    scrolling=no  frameborder=0 ></iframe>
    <iframe srcdoc=""   id=frame3 width=510 frameborder=1   scrolling=yes frameborder=0 ></iframe>
</div>
</Body>

1 个答案:

答案 0 :(得分:0)

将hta转换为html并将iframe设置为src