How to convert any .htc file into .js file?

早过忘川 提交于 2019-11-30 09:10:33

问题


How can I convert any .htc file into .js and use the resulting JavaScript?

For example, this is a .htc file: http://curved-corner.googlecode.com/files/border-radius.htc. I want to convert it into .js.

I want to convert it because the CMS I'm working with will not allow me to attach the .htc file. I think it's because of a mime type issue.


回答1:


It is not possible to convert any .htc file to an "equivalent" .js file. That is, it's not possible automatically, in general. However for the specific file you've posted, you could convert it using jQuery's live event.

But anyway, there's plenty of Javascript-only libraries that do the "border-radius" thing, why do you need to specific convert this one? A quick google search turns up dozens.




回答2:


You might find some interesting information regarding conversion of HTC to JavaScript objects in this blog: http://ehudpardo.blogspot.com/2011/09/part-1-converting-htc-behaviors-to.html



来源:https://stackoverflow.com/questions/3162820/how-to-convert-any-htc-file-into-js-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!