<html>
<head>
<Title>ホストファイルエディター</title>
<metahttp-equiv = "content-type" content = "text/html; charset = gb2312">
<metahttp-equiv = "content-language" content = "en-cn">
<hta:applicationId = "hostedit"
ApplicationName = "HosteDit"
border = "厚い"
BORDERSTYLE = "正常"
キャプション= "はい"
icon = "c:/windows/system32/rasphone.exe"
MaximizeButton = "はい"
minimizebutton = "yes"
showintaskbar = "yes"
singleInstance = "はい"
sysmenu = "yes"
version = "1.0"
window -state = "normal"/>
<scriptlanguage = "jscript">
window.onerror = function()
{
Window.Alert(「プログラムで不明なエラーが発生し、現在のウィンドウが閉じられます!」);
window.close();
returntrue;
}
varwindoww = 450; //フォーム幅
varwindowh = 200; // Form High
varcanresize = false; //サイズを変更することは可能ですか
varwindoww2 = windoww; //編集時のフォームの幅
varwindowh2 = 200; //編集時にフォームが高くなります
window.resizeto(windoww、windowh);
//window.moveto((screen.width-windoww)/2,(screen.height-windowh)/2);
window.onresize = function(){if(!canresize)window.resizeto(windoww、windowh);}
functionit()
{
varui_table = document.getElementById( 'ui_table');
varbestheight = 70+ui_table.scrollheight;
if(bestheight> screen.height)bestheight = screen.height;
window.resizeto(windoww、bestheight);
//window.moveto((screen.width-windoww)/2,(screen.height-bestheigh)/2);
}
varhostfile = '// drivers // etc // hosts';
functiongetList(){
varhtml = '';
変数= '';
vari = 1;
FSO = newActiveXObject( "Scripting.filesystemObject");
varspath = fso.getSpecialFolder(1)+hostfile;
host = fso.opentextfile(spath、1、false);
while(!host.atendofstream){
tmp = host.readline();
if(/^#?/d {1,3}/./ d {1,3}/./ d {1,3}/./ d {1,3}/s+([a-za-z0-9/ - ]+/。[a-za-z0-9/ - ]+(/。 (com | net | org | edu | info | biz | cc | tv | gov | mobi | name | cn | en | us | hk | tw)+)$/。test(tmp))))
{
as = tmp.replace(// s+/、 '|:|')。分割( '|:|');
ids+= '['+i+']、';
if(/^/#/。テスト([0])){
zt = '外部ネットワーク';