<html>
<헤드>
<title> 호스트 파일 편집기 </title>
<metahttp-equiv = "content-type"content = "text/html; charset = gb2312">
<metahttp-equiv = "content-language"content = "en-cn">
<hta : applicationid = "Hostedit"
ApplicationName = "Hostedit"
국경 = "두께"
Borderstyle = "정상"
캡션 = "예"
Icon = "c : /windows/system32/rasphone.exe"
maximizebutton = "예"
MinimizeButton = "예"
Showintaskbar = "예"
SingleInstance = "예"
sysmenu = "예"
버전 = "1.0"
Windowstate = "정상"/>
<scriptLanguage = "jscript">
Window.onerror = function ()
{
window.Alert ( "프로그램에서 알 수없는 오류가 발생하면 현재 창이 닫힙니다!");
Window.Close ();
returntrue;
}
varwindoww = 450; // 형태 너비
varwindowh = 200; // 높은 형태
varcanresize = false; // 크기를 변경할 수 있습니까?
varwindoww2 = windoww; // 너비 편집시 양식
varwindowh2 = 200; // 편집 할 때 양식이 높습니다
window.resizeto (windoww, windowh);
//window.moveto((CREEN.width-Windoww)/2,2.screen.height-Windowh)/2);
window.onresize = function () {if (! canresize) window.resizeto (windoww, windowh);}
functioninit ()
{
varui_table = document.getElementById ( 'ui_table');
varbestheight = 70+ui_table.scrollheight;
if (bestheight> screen.height) bestheight = screen.height;
Window.Resizeto (Windoww, BestHeight);
//window.moveto((creen.width-windoww)/2,20.screen.height-bestheight)/2);
}
varhostfile = '// 드라이버 // 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 | biz | biz | cc | tv | gov | mobi | name | cn | en | hk | tw))+) $/. test (tmp)))))))
{
as = tmp.replace (// s+/, '| : |'). split ( '| : |');
ids+= '['+i+'],';;
if (/^/#/. test (AS [0]) {
zt = '외부 네트워크';