2019年10月11日
HTA MEMO
< title>HTA SAMPLE 01< /title>
< input type="text">
< button onclick="input()">input< /button>
< button onclick="sbHttp()">sbHttp< /button>
< div id="input_table">
< /div>
< script language="vbscript">
Dim InputTsk
Dim tb
set tb=document.getElementById("input_table")
sub input()
'msgbox "input buttonが押されました。"
tb.innerHtml=tb.innerHtml & "< p>input procedureが実行されました。< /p>"
'msgbox tb.innerHtml
CreateObject("Shell.Application").ShellExecute "C:\Program Files\Google\Chrome\Application\chrome.exe","file:///C:/Users.........html"
end sub
Sub sbHttp()
Dim Http,strST
'リンクをクリックする - VBAによるIE自動制御
Set Http = CreateObject("MSXML2.ServerXMLHTTP")
Http.Open "GET", "https://www.post.japanpost.jp/kt/zip/" & _
"e2.cgi?z=" & "1740075" & "&xr=1", False
Http.Send
strHT = StrConv(Http.ResponseBody, vbUnicode)
'strHT =Http.ResponseBody
Set Http = Nothing
tb.innerTEXT=strHT
end sub
< /script>
< script language="javascript">
var tb = document.getElementById("input_table");
window.onload = function() {
}
window.onbeforeunload = function(){
return "本当に離れますか?";
}
< /script>
< HTA:APPLICATION
ID="oHTA" APPLICATIONNAME="name" BORDER="thick"
BORDERSTYLE="normal" CAPTION="yes" CONTEXTMENU="yes" ICON="./icon.ico"
INNERBORDER="no" MAXIMIZEBUTTON="yes" MINIMIZEBUTTON="yes"
NAVIGABLE="no" SCROLL="yes" SCROLLFLAT="yes" SELECTION="yes" SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes" SYSMENU="yes" VERSION="0.0.1" WINDOWSTATE="normal"
/>
< meta http-equiv="content-type" content="text/html; charset=UTF-8">
< input type="text">
< button onclick="input()">input< /button>
< button onclick="sbHttp()">sbHttp< /button>
< div id="input_table">
< /div>
< script language="vbscript">
Dim InputTsk
Dim tb
set tb=document.getElementById("input_table")
sub input()
'msgbox "input buttonが押されました。"
tb.innerHtml=tb.innerHtml & "< p>input procedureが実行されました。< /p>"
'msgbox tb.innerHtml
CreateObject("Shell.Application").ShellExecute "C:\Program Files\Google\Chrome\Application\chrome.exe","file:///C:/Users.........html"
end sub
Sub sbHttp()
Dim Http,strST
'リンクをクリックする - VBAによるIE自動制御
Set Http = CreateObject("MSXML2.ServerXMLHTTP")
Http.Open "GET", "https://www.post.japanpost.jp/kt/zip/" & _
"e2.cgi?z=" & "1740075" & "&xr=1", False
Http.Send
strHT = StrConv(Http.ResponseBody, vbUnicode)
'strHT =Http.ResponseBody
Set Http = Nothing
tb.innerTEXT=strHT
end sub
< /script>
< script language="javascript">
var tb = document.getElementById("input_table");
window.onload = function() {
}
window.onbeforeunload = function(){
return "本当に離れますか?";
}
< /script>
< HTA:APPLICATION
ID="oHTA" APPLICATIONNAME="name" BORDER="thick"
BORDERSTYLE="normal" CAPTION="yes" CONTEXTMENU="yes" ICON="./icon.ico"
INNERBORDER="no" MAXIMIZEBUTTON="yes" MINIMIZEBUTTON="yes"
NAVIGABLE="no" SCROLL="yes" SCROLLFLAT="yes" SELECTION="yes" SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes" SYSMENU="yes" VERSION="0.0.1" WINDOWSTATE="normal"
/>
< meta http-equiv="content-type" content="text/html; charset=UTF-8">
【このカテゴリーの最新記事】
-
no image
-
no image
-
no image
-
no image
-
no image
posted by vbahtmlmemo at 10:45| (カテゴリなし)