28,390
社区成员
发帖
与我相关
我的任务
分享
<script type="text/javascript">
function open_windows_and_get_selectedinfo(openwindow, control) {
var str = window.showModalDialog(openwindow, window, "dialogWidth=740px;dialogHeight=600px;center=yes;help=no;resizable=no;status=no");
if (!str)
return;
document.getElementById(control).value = str[0];
}
</script>
<td colspan="3" align="left" bgcolor="#FFFFFF" >
<input name="byyx" type="text" id="byyx" size="50" readonly="readonly" />
<input type="button" id="selectActive" onclick="javascript:open_windows_and_get_selectedinfo('xxlist.asp','byyx')" value="选择" />
</td>
<script type="text/javascript" language="javascript">
function dbclick_return_and_close(strvalue) {
//alert("执行该方法!");
var str = new Array(strvalue);
window.returnValue = str;
window.close();
}
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<table width="300" border="0" align="center" cellpadding="6" cellspacing="0">
<form method="post" name="xxSearch" id="xxSearch" >
<tr>
<td width="90" align="right">学校名称:</td>
<td width="107"><input name="xxmc" type="text" value="" /></td>
<td width="67"><input type="image" src="Images/yes.gif" name="Submit" value="开始搜索" />
</td>
</tr>
</form>
</table>
</td>
</tr>
<tr>
<td valign="top" bgcolor="#D7EBFF">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#ABD0E2">
<%
set rs1=server.createobject("adodb.recordset")
'sql1="select id,xxmc from gxlb"
xxmc = trim(request.Form("xxmc"))
if xxmc = "" then
sql1 = "select id,xxmc from gxlb"
else
sql1 = "select id,xxmc from gxlb where xxmc like '%"&xxmc&"%'"
end if
set rs1 = conn.execute(sql1)
i = 0
if not rs1.EOF then
While Not rs1.EOF
%>
<tr>
<td width="11%" height="25" bgcolor="#D7EBFF"><div align="center"><%=rs1("id")%></div></td>
<td width="75%" bgcolor="#D7EBFF"> <%=rs1("xxmc")%></td>
<td width="14%" bgcolor="#D7EBFF"><div align="center"><a href="#" onclick="javascript:dbclick_return_and_close('<%=rs1("xxmc")%>');">选择</a></div></td>
</tr>
<%
i = i + 1
rs1.MoveNext
Wend
else %>
数据库中无相关数据!
<% end if
rs1.close
set rs1=nothing
%>
</table>
</body>