intID=Request("intID")
if trim(intID)="" then
Response.Write("非法连接")
Response.End()
end if
'初始化库
set Conn=Server.CreateObject("ADODB.Connection")
Conn.open Application("db")
Set Rs2=Server.CreateObject("ADODB.RecordSet")
exec="select * from wt"
Rs2.open exec,Conn,0,1
%>
<script language="javascript">
<!--
var twoCount
twoCount=0
TwoArray=new Array()
<%
SecondCount=0
do while not Rs2.eof
%>
TwoArray[<%=SecondCount%>]=new Array('<%=trim(Rs2("ID"))%>','<%=trim(Rs2("Name"))%>')
<%
SecondCount=SecondCount+1
Rs2.MoveNext
Loop
Rs2.close
set Rs2=nothing
%>
twoCount=<%=SecondCount%>
赋值:
<script language="javascript">
function ChangeKind()
{ var object=document.form1.selectNewsType
//清空下拉框
object.length=0
if(S_IsNews=="0")
{
//把div selectTop显示 select 为selecttopic
document.getElementById("selectTop").style.visibility="visible"
document.getElementById("selectTop").style.display=""
for(var j=0;j<oneCount;j++)
{
document.form1.selectTopic.options.add(new Option(OneArray[j][1].substring(0,20),OneArray[j][0],true,true))
}
}}
</script>