精易论坛

标题: 易语言 调用本地HTML 并实现里面的内容(HTML文档转TXT)) [打印本页]

作者: airaz    时间: 2025-6-23 08:00
标题: 易语言 调用本地HTML 并实现里面的内容(HTML文档转TXT))
DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>HTML转TXT工具</title>
    <script>
        function htmlToTxt(html) {
            const tempDiv = document.createElement("div");
            tempDiv.innerHTML = html;
            return tempDiv.textContent || tempDiv.innerText || "";
        }

        function convertHtmlToTxt() {
            const htmlInput = document.getElementById('htmlInput').value;
            const txtOutput = document.getElementById('txtOutput');
            txtOutput.value = htmlToTxt(htmlInput);
        }
    </script>
</head>
<body>
    <textarea id="htmlInput" style="width:100%;height:200px"></textarea>
    <button>转换</button>
    <textarea id="txtOutput" style="width:100%;height:200px" readonly></textarea>
</body>
</html>


看到有用 类_脚本组件   调用 mshta

改了一下 改不出来 大家帮帮忙 谢谢





作者: 熬夜    时间: 2025-6-23 08:00
这种https://125.confly.eu.org/forum.php?mod=viewthread&tid=14842975
还是这种https://125.confly.eu.org/forum.php?mod=viewthread&tid=14603869

作者: 云少i    时间: 2025-6-23 08:21
直接改后缀不行吗?
作者: chaqing    时间: 2025-6-23 08:48
最省事是浏览器组件打开,然后用浏览器组件功能执行函数
作者: airaz    时间: 2025-6-23 09:49
熬夜 发表于 2025-6-23 09:37
这种https://125.confly.eu.org/forum.php?mod=viewthread&tid=14842975
还是这种https://125.confly.eu.org/forum.php?mo ...

我是想这种
https://125.confly.eu.org/forum.php?mod=viewthread&tid=14797024


原来精易 自带了 谢谢




欢迎光临 精易论坛 (https://125.confly.eu.org/) Powered by Discuz! X3.4