打开的页面中加载一个用户控件,HTML代码如下
<%
dim ServerUrl, ServerUrlList
DocID = request.form("DocID")
DocTitle = request.form("DocTitle")
UserName = request.form("UserName")
EditType = request.form("EditType")
ServerUrl = "http://" + request.servervariables("SERVER_NAME") + ":" + request.servervariables("SERVER_PORT") + request.servervariables("URL")
ServerUrlList = split(ServerUrl, "/")
ServerUrl = ""
for i = 0 to Ubound(ServerUrlList) - 1
ServerUrl = ServerUrl & ServerUrlList(i) & "/"
next
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>SURE WebOffice测试页面</title>
<link rel="stylesheet" href="kyo.css" type="text/css"><script language="javascript" type="text/javascript"> function OpenDoc()
{
var name=window.top.frames(0).document.theFCO.getVarValue("B30");
document.SureOffice.Open("./"+name+"", false);
document.SureOffice.SetZoomPerc(80);
document.SureOffice.ProtectDoc(1, 1, "121212");
}
</script>
</head><body style="BACKGROUND:#ccc" onload="return OpenDoc()">
<div align="center";
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: #fff; PADDING-BOTTOM: 0px; MARGIN: -10px 0px 0px; WIDTH: 1024px; PADDING-TOP: 10px; HEIGHT: 610px">
<form name="myform" method="post" enctype="multipart/form-data" runat="server"> <div align="center">
<table width="95%" align="center">
<tr>
<td valign="top" class="leftTableData">
下面的行加载控件: <object classid="clsid:00460182-9E5E-11d5-B7C8-B8269041DD57" align="middle" id = "SureOffice" style="width: 700px; height: 520px">
</object>
</td>
</tr>
</table>
</div></form></div>
</body></html>现在要做一个js的function,把用户控件嵌入一个页面,求大家帮写个,偶不懂这个。。杯具
<%
dim ServerUrl, ServerUrlList
DocID = request.form("DocID")
DocTitle = request.form("DocTitle")
UserName = request.form("UserName")
EditType = request.form("EditType")
ServerUrl = "http://" + request.servervariables("SERVER_NAME") + ":" + request.servervariables("SERVER_PORT") + request.servervariables("URL")
ServerUrlList = split(ServerUrl, "/")
ServerUrl = ""
for i = 0 to Ubound(ServerUrlList) - 1
ServerUrl = ServerUrl & ServerUrlList(i) & "/"
next
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>SURE WebOffice测试页面</title>
<link rel="stylesheet" href="kyo.css" type="text/css"><script language="javascript" type="text/javascript"> function OpenDoc()
{
var name=window.top.frames(0).document.theFCO.getVarValue("B30");
document.SureOffice.Open("./"+name+"", false);
document.SureOffice.SetZoomPerc(80);
document.SureOffice.ProtectDoc(1, 1, "121212");
}
</script>
</head><body style="BACKGROUND:#ccc" onload="return OpenDoc()">
<div align="center";
style="PADDING-RIGHT: 0px; PADDING-LEFT: 0px; BACKGROUND: #fff; PADDING-BOTTOM: 0px; MARGIN: -10px 0px 0px; WIDTH: 1024px; PADDING-TOP: 10px; HEIGHT: 610px">
<form name="myform" method="post" enctype="multipart/form-data" runat="server"> <div align="center">
<table width="95%" align="center">
<tr>
<td valign="top" class="leftTableData">
下面的行加载控件: <object classid="clsid:00460182-9E5E-11d5-B7C8-B8269041DD57" align="middle" id = "SureOffice" style="width: 700px; height: 520px">
</object>
</td>
</tr>
</table>
</div></form></div>
</body></html>现在要做一个js的function,把用户控件嵌入一个页面,求大家帮写个,偶不懂这个。。杯具
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货