国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > HTML > 正文

HTA編輯HOST文件的腳本

2024-08-26 00:15:48
字體:
供稿:網(wǎng)友
<HTML>
<HEAD>
<TITLE>HOSTS 文件編輯器</TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-CN">
<HTA:APPLICATION ID="hostedit"
APPLICATIONNAME="hostedit"
BORDER="thick"
BORDERSTYLE="normal"
CAPTION="yes"
ICON="C:/WINDOWS/system32/rasphone.exe" 
MAXIMIZEBUTTON="yes"
MINIMIZEBUTTON="yes"
SHOWINTASKBAR="yes"
SINGLEINSTANCE="yes"
SYSMENU="yes"
VERSION="1.0"
WINDOWSTATE="normal" />
<script language="JScript">
window.onerror = function ()
{
    window.alert("程序發(fā)生了未知錯誤,當(dāng)前窗口將被關(guān)閉!");
    window.close();
    return true;
}
var windowW=450;    //窗體寬
var windowH=200;    //窗體高
var canresize=false;//是否可以改變大小
var windowW2=windowW;//編輯時窗體寬
var windowH2=200;//編輯時窗體高
window.resizeTo(windowW,windowH);
//window.moveTo((screen.width-windowW)/2,(screen.height-windowH)/2);
window.onresize=function(){if(!canresize)window.resizeTo(windowW,windowH);}
function init()
{
    var ui_table = document.getElementById('UI_TABLE');
    var bestHeight = 70+ui_table.scrollHeight;
    if(bestHeight > screen.height) bestHeight = screen.height;
    window.resizeTo(windowW, bestHeight);
    //window.moveTo((screen.width-windowW)/2,(screen.height-bestHeight)/2);
}
var hostfile = '//drivers//etc//hosts';
function getlist(){
    var html='';
    var ids='';
    var i=1;
    FSO = new ActiveXObject("Scripting.FileSystemObject");
    var spath = 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+/,'|:|').split('|:|');
        ids+='['+i+'],';
        if(/^/#/.test(as[0])){
            zt = '外網(wǎng)';
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 沙洋县| 永济市| 桓仁| 高碑店市| 荆州市| 元阳县| 桃园市| 健康| 台南市| 辛集市| 永和县| 胶州市| 建阳市| 顺平县| 绵竹市| 巧家县| 磐石市| 赤城县| 岢岚县| 平阴县| 新余市| 鹤山市| 博湖县| 新余市| 新干县| 来宾市| 沙雅县| 正定县| 静乐县| 扎兰屯市| 常宁市| 昌都县| 瑞丽市| 文成县| 惠州市| 湘阴县| 会宁县| 东兰县| 吉木乃县| 清新县| 固原市|