昨天看了一篇介绍Internet Explorer Behaviors的文章。
http://msdn.microsoft.com/msdnmag/issues/1200/cutting/

通过Behaviors和HTC结合可以用脚本制作客户端的代码模块和控件。
HTC Behaviors主要有三种形式:Attached Behavior, Element Behavior, and ViewLinks. Attached Behaviors 可以通过CSS样式的形式来帮定到任何html元素,而element behavior相当于固化到了自定义的用户标记元素中去了。ViewLinks技术使得htc代码更加独立。
下面是采用behaviors的控件tabstrip:
HTC & Element Behaviors in Internet Explorer.
这个是colorpicker:
HTC & Element Behaviors in Internet Explorer.
实际上当你定义了自己的htc behavior之后,表示这些客户端控件之需要用一个自定义的tag来表示就行了,而且这些控件可以在多个地方重用。也可以在tag上用attribute或jscript来设置htc暴露出来的属性。
以上只是Internet Explorer Behaviors的一个部分,
要更多的了解Behaviors可以参考:
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/behaviors/overview.asp
 关于htc的参考:
http://msdn.microsoft.com/library/default.asp?url=/workshop/components/htc/reference/htcref.asp

相关文章:

  • 2021-08-30
  • 2022-02-01
  • 2021-08-17
  • 2022-01-11
  • 2021-10-27
  • 2021-11-10
猜你喜欢
  • 2021-05-24
  • 2021-12-17
  • 2022-02-23
  • 2022-02-02
  • 2021-06-22
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案