在网页调用 WINDOWS 控件两例_Dreamweaver教程

编辑Tag赚U币
教程Tag:暂无Tag,欢迎添加,赚取U币!

一、这个是netmting的例子

<html>
<head>
<title>OCX</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript">
var flag=true
function showall(){
alist = new Array();
newocx();
list1.value = "";
list2.value = "";
list1.value = ocxtype.outerHTML;
j = 0;
for (i in ocxtype)
{
alist[j] = i;
j ;
}
for (i = 0; i < alist.length; i )
for (j = (alist.length-1); j > 0; j--)
{
if (alist[j] < alist[j-1])
{
temps = alist[j];
alist[j] = alist[j-1];
alist[j-1] = temps;
}
}
for (i = 0; i < alist.length; i )
list2.value = alist[i] "\n";
alert("共有 " alist.length " 个属性方法")
}
function newocx()
{
ocxfield.innerHTML = "<OBJECT ID='ocxtype' WIDTH='0px' HEIGHT='0px'"
"CLASSID='CLSID:" ocxid.value "'></OBJECT>";
}
</script>
</head>

<body bgcolor="#FFFFFF" text="#000000">

<div align="center">
<p>classid
<input type="text" id="ocxid" style="width:400" value="F3A614DC-ABE0-11d2-A441-00C04F795683" onchange="jscript:flag=true">
<input type="button" id="look" value="查看" onclick="showall()">
</p>
<table width="75%" border="1">
<tr>
<td height="24">
<div align="center">html中的写法</div>
</td>
<td height="24">
<div align="center">OCX中的属性事件</div>
</td>
</tr>
<tr>
<td>
<textarea id="list1" style="width: 500px; height: 400px;" readonly></textarea>
</td>
<td>
<textarea id="list2" style="width:250px; height:400px;" readonly></textarea>
</td>
</tr>
</table>
</div>
<div id="ocxfield">
</div>
</body>
</html>

二、

<script language="Javascript">
function ShowMessenger() {
if (messengerUI.object != null) {
var MsgrWindow
if (messengerUI.myStatus == 2) {
MsgrWindow = messengerUI.window;
MsgrWindow.show();
}
else
messengerUI.Signin(0,"","");
}
}

function ShowElement(element) {
element.style.display="";
document.msn.offline.value="ON";
}
function HideElement(element) {
//rowShow.style.visibility="hidden";
element.style.display="none";
document.msn.offline.value="OFF";
}

function ShowHide(element) {
if (document.msn.offline.value=="ON") {
HideElement(element);
}
else {
ShowElement(element);
}

}
</script>
<style type="text/css">

共6页上一页123456下一页
来源:网上收集//所属分类:Dreamweaver教程/更新时间:2005-05-04
相关Dreamweaver教程