足球游戏_中国足彩网¥体育资讯$

扣代码工具hta版
来源:易贤网 阅读:959 次 日期:2014-08-12 17:07:26
温馨提示:易贤网小编为您整理了“扣代码工具hta版”,方便广大网友查阅!

复制下面的代码,最好用editplus等专业点的编辑工具。

代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=gbk" />

<title>页面内容捕获器</title>

<style>

* { font-size:12px; }

html { padding:0px; margin:0px; border-style:none; border-width:0px; overflow:auto; background-color:buttonface; }

body { padding:0px; margin:0px; border-style:none; border-width:0px; background-color:buttonface; }

li { line-height:24px; height:24px; margin:10px 0px -10px 15px; }

a { color:blue; }

input { border-width:1px; }

#output { width:90%; height:150px; overflow:auto; }

</style>

<script>

var win;

function $(s){ return document.getElementById(s); }

window.onload = function(){

    var myHeight = 320;

    window.moveTo(0,0);

    window.resizeTo(screen.availWidth, myHeight);

    //打开一个浏览器

    win = new ActiveXObject("InternetExplorer.Application");

    win.left = 0; win.top = myHeight;

    win.width = screen.availWidth; win.height = screen.availHeight - myHeight;

    win.navigate2("about:blank");

    win.visible = true;

    setInterval(function(){ try{ win.document; }catch(e){ window.close(); } }, 1); //窗口关闭后自动退出程序

    //页面卸载时关闭浏览器

    window.onunload = function(){ win.quit(); }

    //自动捕获

    setInterval(doCapture, 1);

}

function doCapture(){

    try{

        win.document.onclick = capIt;

    }catch(e){}

}

function capIt(){

    var d = win.document, w = d.parentWindow, e = w.event, el = e.srcElement;

    $("currentObj").bound = el;

    $("currentObj").innerHTML = el.tagName;

    showCapture(el);

    e.cancelBubble = true;

    e.returnValue = false;

    return false;

}

function showCapture(el){

    if(!el)return;

    var oldBorderStyle = el.style.borderStyle, oldBorderWidth = el.style.borderWidth, oldBorderColor = el.style.borderColor;

    el.style.border = "2px solid red";

    setTimeout(function(){ try{ el.style.borderStyle = oldBorderStyle; el.style.borderWidth = oldBorderWidth; el.style.borderColor = oldBorderColor; }catch(e){} }, 300);

}

function parentCapture(){

    var el = $("currentObj").bound;

    if(!el || !el.parentNode || el.parentNode.nodeType != 1 )return;

    el = el.parentNode;

    $("currentObj").bound = el;

    $("currentObj").innerHTML = el.tagName;

    showCapture(el);

}

function showCaptureCurrentStyle(){

    var el = $("currentObj").bound;

    if(!el)return;

    var re = [], s = el.currentStyle;

    for(var i in s)if(s[i] != "")re.push(i+":"+s[i]+";");

    $("output").value += "\r\n<!--Current Style:\r\n" + re.join(" ") + "\r\n-->\r\n";

}

function showCaptureAllEvent(){

    var el = $("currentObj").bound, re = [];

    if(!el)return;

    for(var i in el)if(String(i).indexOf("on") == 0 && el[i])re.push(String(el[i]));

    $("output").value += "\r\n<!--All Bound Event:\r\n" + re.join("\r\n") + "\r\n-->\r\n";

}

function doExportHTML(){

    if(!$("currentObj").bound)return;

    $("output").value += "\r\n" + $("currentObj").bound.outerHTML + "\r\n";

}

function doExportInnerCSS(){

    var o = win.document.getElementsByTagName("style");

    for(var i=0; i<o.length; i++)$("output").value += "\r\n<style>\r\n" + o[i].innerHTML + "\r\n<\/style>\r\n";

}

function doExportFunction(){

    var o = win.document.parentWindow, str = $("funcName").value.split("."), i = -1;

    while(++i< str.length && (o = o[str[i]]));

    if(!o)return;

    $("output").value += "\r\n<script>\r\n" + o + "\r\n<\/script>\r\n";

}

function doTest(){

    var nw = window.open("", "_blank");

    nw.document.open();

    nw.document.write($("output").value);

    nw.document.close();

}

</script>

</head>

<body>

<ul>

    <li>

        目前已捕获到对象:

        <a href="###" onclick="showCapture(this.bound); return false;" id="currentObj">无</a>    <<   

        <a href="###" onclick="parentCapture(); return false;">获取其父对象</a>

          |  

        <a href="###" onclick="doExportHTML(); return false;">导出HTML</a>

          |  

        <a href="###" onclick="showCaptureCurrentStyle(); return false;">导出其当前样式</a>

          |  

        <a href="###" onclick="showCaptureAllEvent(); return false;">导出其绑定的所有事件</a>

    </li>

    <li>

        导出内部样式表:

        <a href="###" onclick="doExportInnerCSS(); return false;">导出</a>

    </li>

    <li>

        导出JS函数:

        <input type="text" value="" onfocus="this.value='';" size="30" id="funcName">

          |  

        <a href="###" onclick="doExportFunction(); return false;">导出</a>

    </li>

    <li>

        导出的数据:

          |  

        <a href="###" onclick="doTest(); return false;">测试</a>

          |  

        <a href="###" onclick="$('output').value=''; return false;">清除</a>

        <br/>

        <textarea id="output"></textarea>

    </li>

</ul>

</body>

</html>

使用方法是这样的:

1. 压缩包中的文件

2. 运行后会出现一个程序窗口和一个IE浏览器窗口,上下排列

3.在浏览器中输入需要扣代码的网站地址,回车进去需要的站点

4.在需要扣代码的效果上点击鼠标,例如上图中的链接。可以看到程序窗口中已经捕获到了这个对象。如果需要其父对象,只需要单击程序窗口中的 “获取其父对象” 链接。

5. 单击程序窗口中的 “导出HTML” 链接,可以得到当前对象的HTML内容(即使这个内容是用脚本动态生成的也可以捕获)

6.在 “导出JS函数” 后的文本框中输入想查看的 JS函数名(支持 “gbar.qs” 这种形式),可以得到 JS 函数内容。免去一个一个外部 JS 文件查找的辛苦。

其他功能请自己琢磨。

有什么疑问请留言。

中国足彩网信息请查看IT技术专栏

中国足彩网信息请查看脚本栏目
易贤网手机网站地址:扣代码工具hta版
由于各方面情况的不断调整与变化,易贤网提供的所有考试信息和咨询回复仅供参考,敬请考生以权威部门公布的正式信息和咨询为准!
关于我们 | 联系我们 | 人才招聘 | 网站声明 | 网站帮助 | 非正式的简要咨询 | 简要咨询须知 | 加入群交流 | 手机站点 | 投诉建议
工业和信息化部备案号:滇ICP备2023014141号-1 足球游戏_中国足彩网¥体育资讯$ 滇公网安备53010202001879号 人力资源服务许可证:(云)人服证字(2023)第0102001523号
云南网警备案专用图标
联系电话:0871-65317125(9:00—18:00) 获取招聘考试信息及咨询关注公众号:hfpxwx
咨询QQ:526150442(9:00—18:00)版权所有:易贤网
云南网警报警专用图标