.htc和.js文件有什么区别? [英] What is difference between .htc and .js file?

查看:122
本文介绍了.htc和.js文件有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.htc和.js文件有什么区别?我们能否将任何.htc文件转换为.js文件?



问题是如果我们使用htc进行png修复,那么我们使用



<$ p将htc添加到css文件$ p> body {behavior:url(csshover3.htc); }

但这不是W3C有效,所以想要将.htc转换为.js然后使用作为要附加的js文件,因此它将对W3C有效。



任何人都可以告诉我如何转换和使用任何.htc文件作为JavaScript文件吗?

解决方案

从技术上讲,您可以使用条件注释来验证代码。



http://msdn.microsoft.com/en-us /library/ms537512%28VS.85%29.aspx



一个hack是一个黑客攻击,很奇怪MS以这样的方式制造了这个黑客攻击一个有效的黑客。



现在,还有其他需要考虑的事情 - 您使用的是JavaScript库吗?然后您应该使用该库来执行此功能,这将消除对HTC的需要(需要启用JavaScript才能运行)。


What is difference between .htc and .js file? Can we convert any .htc file to a .js file?

The problem is if we use htc to make png fixes, then we add htc to css file using

body { behavior: url("csshover3.htc"); } 

But this is not W3C valid, so want to convert the .htc to .js and then use as a js file to attach in so it will be W3C valid.

Can anyone tell me how to convert and use any .htc file as JavaScript file?

解决方案

Technically, you can use conditional comments to allow the code to validate.

http://msdn.microsoft.com/en-us/library/ms537512%28VS.85%29.aspx

A hack is a hack, it's just weird that MS made this hack in a way that it's a valid hack.

Now, something else to consider - are you using a JavaScript library? Then you should be using the library to do this functionality, which would eliminate the need for the HTC (which needs JavaScript enabled to run).

这篇关于.htc和.js文件有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆