◆ [2025-5-20 星期二 14:5] ◆ | ◆ 收藏本站 ◆ | ◆ 设为首页 ◆ |
![]() |
|
---|
首 页 | 论坛交流 | 游戏频道 | 无忧脚本 | 旧版论坛 | 云服务器 | 聊 天 室 | 自助链接 | 来访记录 | 访客留言 | 搜索提供 |
位置:風雲工作室 - 论坛交流 - 技术专栏 - 脚本中心 - 【疑问】sct | 返回 |
主题:【疑问】sct | |||||||
|
(1楼)【疑问】sct
怎么使用event的
<?xml version="1.0" encoding="gb2312"?> <package> <component> <registration progid="asfman.behavior"/> <public> <attach event="onmouseover" handler="event_onmouseover"/>; </public> <implements type="Behavior"/> <script language="JScript"> <![CDATA[ function event_onmouseover() { oElement = window.event.srcElement; if (oElement == element) { oElement.style.cursor = "hand"; oElement.style.color = "red"; } } ]]> </script> </component> </package> 如何在htm里触发onmouseover,写个例子看看 |
||||||
|
|||||||
|
(2楼)
已解决
|
||||||
|
|||||||
|
(3楼)
告诉你一个郁闷的消息,貌似IE的Internet安全设置默认支持HTC但不支持WSC。不过本地调试默认还是支持wsc的。
51js上无殇的“快书”里面就有一个event事件的例子。经过多次测试,目前仅发现behavior中支持事件。ASP不支持。 |
||||||
|
|||||||
|
(4楼)
<?xml version="1.0" encoding="gb2312"?>
<component> <?component error="true" debug="true"?> <public> <property name="Data" /> <property name="Ready" /> <method name="GetFile"> <parameter name="URL" /> <parameter name="f" /> </method> <method name="Abort"> </method> </public> <implements type="Behavior"> <event name="DownImgOk" /> </implements> <object progid="Microsoft.XmlHttp" id="Http" /> <script language="javascript"> <![CDATA[ var Data; function onReady() { Ready=Http.readyState; if(Ready<4)return; Data = Http.responseBody; Abort(); fireEvent("DownImgOk"); Ready=0; } function GetFile(URL,f) { try{ Http.onreadystatechange = onReady; Http.open("GET",URL,f,"",""); Http.setRequestHeader("Referer",URL.replace(/^(.*?[^\/])\/[^\/].*$/,"$1")); Http.send(null); }catch(e){ } } function Abort() { Http.abort(); } ]]> </script> </component> |
||||||
|