Behavior学习笔记(六)

自定义的METHOD:
在"HTC"中建立的副程序,除了让HTC本身的处理程序使用,还可以加入<Public:method name="程序名称">
声明成自定义的"METHOD",让主程序的元件使用。见如下代码:
xmllover.htc
<public:method name="change1()"/>
<Script language="vbscript">
pos=1
    sub change1()
    str="我是xmllover我怕谁~~~"
    text1=space(20)+str
    element.value=mid(text1,pos)
    pos=pos+1
    if pos>len(text1) then pos=1
end sub
</script>

xmllover.htm
<html>
<head>
    <title>xmllover</title>
    <style>
    .type1 {behavior:url(xmllover.htc)}
    </style>
    <script language="vbscript">
    sub start()
        window.setinterval "t1.change1",500
    end sub
    </script>
</head>

</body>
<input type="text" name="t1" size="24" class="type1" style="font-size:18">
<p>
<input type="button" name="b1" value="click me" onclick="start()">
</body>
</html>    
自定义的动画效果!!!
300*300
  • 没有相关文章
  • 没有评论
 文章首页关于迷茫时代关于我写意人生
版权所有:迷茫时代 All rights reserved   
执行时间:0.00345 秒