|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
求教:在中的參數如何在ASP中調用?
求教:在<script>中的參數如何在ASP中調用? |
頂一下,就是說要VBSCRIP中的變量如何在<% %>中調用?
有沒有高手指點一下? |
再頂一下直到有人指教為止 |
<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="SELECT * FROM data order by addtime DESC"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write "document.write('<p align=center><font color=red>還沒有公告,正等你發呢~!</font></p>')"
else
do while not rs.eof and news<shu
if len(rs("name"))>max then
title=Left(rs("name"),max)&"..."
else
title=rs("name")
end if%>
document.write('<img src=<%=softurl%>images/br_dot.gif> <a href="<%=softurl%>show.asp?id=<%=rs("id")%>" target=blank><%=title%></a><font color="#8d867c">[<%=rs("addtime")%>]</font><br>')
<%news=news+1
rs.movenext
loop
end if
rs.close:set rs=nothing
%> |
上面的給你參考一下啊,是一個JS調用ASP啊 ,,
用JS調用時一定要寫成JS的語句形式啊,
頁面在執行時,是由服務器先執行ASP,然後發給客戶機,運行JS。 |
謝謝了,我倒是忘了ASP和JS不是同時執行的。 |
|