.htc 和 .js 文件有什么区别?我们可以将任何 .htc 文件转换为 .js 文件吗?
问题是如果我们使用 htc 来修复 png,那么我们使用
将 htc 添加到 css 文件body { behavior: url("csshover3.htc"); }
但这不是 W3C 有效的,所以想将 .htc 转换为 .js,然后用作 js 文件附加进去,这样它将是 W3C 有效的。
谁能告诉我如何将任何 .htc 文件转换和用作 JavaScript 文件?
最佳答案
For Microsoft Internet Explorer 5 and later, HTML Components (HTCs) provide a mechanism to implement components in script as Dynamic HTML (DHTML) behaviors. An HTC is an HTML file that contains script and a set of HTC-specific elements that define the component. The component is saved with an .htc extension. This section lists these HTC-specific elements and the members they support.
因此,它们不仅仅是 javascript .js 文件,它们还包含一组 HTC 特定的元素。
编辑:
关于从.htc 到.js 的转换,我不确定是否可以直接完成,但我遇到了this一组 .js 工具,用于解决 .htc 文件试图在 IE 中修复的相同问题。
关于javascript - .htc 和 .js 文件有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1617667/