如何在asp/htm内传递参数给Active Form,Active Form如何接收??
解决方案 »
- 如何让程序退出循环
- 怎么才能在客户端中强行中断与COM+服务器的调用接口的操作???急~~~
- 转换的问题,一有答应立即结贴
- [***分享***]DBGRIDEH 组件在Borland开发工具中应用全攻略
- 有没有人用过TDrawGrid 么在给定的cell里draw颜色呢?
- 大富翁临时域名:http://delphibbs.sumaster.com/
- Delphi中预想不到的代码
- ACCESS里对某几个字段不是全部字段插入一条纪录的语句是什么?
- Delphi 6.0中属性编辑器的解决方案
- 求助,有关李颖的数据备份控件的问题
- 怎样在SQL SERVER 上动态创建数据库?
- 怎样让程序运行,但在进程中不显示!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>New Page 1</title>
<script language="JavaScript">
<!--
function Showmsg() {
document.all["txtNow"].value = Ax1.FNow;
document.all["txtDate"].value = Ax1.FDate;
document.all["txtTime"].value = Ax1.FTime; var now = new Date();
var year = now.getYear();
var month = now.getMonth()+1;
var date = now.getDate();
var datestr = year+"-"+month+"-"+date;
document.all["txtDateTime"].value = datestr;
}function SetCaption(){
Ax1.lblCaption = "SetCaption";
Ax1.FCaption = "FCaption";
} function SetParam(){
Ax1.PassParam("1111", "2222", "string", "127");
} function Clear(){
Ax1.Clear();
}function GetParam(){
var pa1;
var pa2;
Ax1.OutParam(pa1, pa2);
document.all["txtParam1"].value = pa1;
document.all["txtParam2"].value = pa2;
}
//-->
</script>
</head><body onload="Showmsg()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#CCCCCC" rowspan="2">
<object classid="clsid:97BA702A-E192-4ADE-804C-F3B05B833ADA"
name="Ax1"
width="394"
height="256">
<param name="ButtonCaption" value="ButtonCaption">
<param name="btnCaption" value="btnCaption">
<param name="lblCaption" value="lblCaption">
<param name="FCaption" value="FCaption">
<param name="AxBorderStyle" value="0">
</object>
</td>
<td valign="top" align="center" bgcolor="#CCCC00">
<input type="text" name="txtNow" size="50">
<br/>
<input type="text" name="txtDate" size="50">
<br/>
<input type="text" name="txtTime" size="50">
<br/>
<input type="text" name="txtDateTime" size="50">
<br/>
<input type="button" name="B1" value="GetProperty" onClick="Showmsg()">
</td>
</tr>
<tr>
<td valign="top" align="center" bgcolor="#669900">
<input type="text" name="txtParam1" size="50">
<br/>
<input type="text" name="txtParam2" size="50">
<br/>
<input type="button" name="B2" value="GetParam" onClick="GetParam()">
</td>
</tr>
<tr align="center" bgcolor="#009999">
<td colspan="2">
<input type="button" value="SetCaption" name="B3" onClick="SetCaption()">
<input type="button" value="SetParam" name="B4" onClick="SetParam()">
<input type="button" value="Clear" name="B5" onClick="Clear()">
</td>
</tr>
</table>
</body>
</html>
网页如下:
<HTML>
<H1> Delphi 5 ActiveX Test Page </H1><p>
You should see your Delphi 5 forms or controls embedded in the form below.
<HR><center><P>
<OBJECT
classid="clsid:11869FE4-128E-4E73-9246-4FB2CA8D323F"
id="test" name="test"
codebase="/Project1.ocx#version=1,0,0,0"
width=181
height=87
align=center
hspace=0
vspace=0
>
</OBJECT>
</HTML>
<script language=vbscript>
function window_onload()
test.hello ="hello"
//.hello 是ActiveForm里的一个外露的属性
end function
</script>