Recommended: Interpret and process multi-keyword query instance code In web development, I often encounter multiple keyword pairs of single field queries, which I usually implement through dynamic arrays. Of course, multiple keywords are generally separated by spaces or,. I assume that multiple keywords are separated by spaces, the keyword string is keyStr, and the specific code is
| The following is the quoted content: <!--This is a homepage file--> <html> <head> <meta http-equiv=Content-Type content=text/html; charset=gb2312 /> <title>Slide News</title> </head> <body> <!--#Include file=diaoyong.asp--> </body> </html> <!-- Just call the following file This is a file with the file name:diaoyong.asp Flash file inside the symbol --> <% 'Slide News Db=../CuoXIn_Data/CuoXIn_Data.Asp Set conn = Server.CreateObject(ADODB.Connection) Connstr=Provider=Microsoft.Jet.OLEDB.4.0;Data Source= & Server.MapPath(db) Conn.Open Connstr sql=select top 5 * from [Music_List_Tupian_System] where IswNumsSex='rotating ad' order by IswNumsID desc set rs=server.createobject(adodb.recordset) rs.open sql,conn,1,1 if not rs.eof then k=1 Num_total=rs.recordcount for i=1 to 5 if i>Num_total then exit for if i=1 then imgUrl11=Img/&rs(IswNumsPhoto) if len(rs(IswNumsUser))>=18 then imgtext11= left(rs(IswNumsUser),18)&... else imgtext11=rs(IswNumsUser) end if imgLink11=rs(IswNumsClass) end if if i=2 then imgUrl22=Img/&rs(IswNumsPhoto) if len(rs(IswNumsUser))>=18 then imgtext22= left(rs(IswNumsUser),18)&... else imgtext22=rs(IswNumsUser) end if imgLink22=rs(IswNumsClass) end if if i=3 then imgUrl33=Img/&rs(IswNumsPhoto) if len(rs(IswNumsUser))>=18 then imgtext33= left(rs(IswNumsUser),18)&... else imgtext33=rs(IswNumsUser) end if imgLink33=rs(IswNumsClass) end if if i=4 then imgUrl44=Img/&rs(IswNumsPhoto) if len(rs(IswNumsUser))>=18 then imgtext44= left(rs(IswNumsUser),18)&... else imgtext44=rs(IswNumsUser) end if imgLink44=rs(IswNumsClass) end if if i=5 then imgUrl55=Img/&rs(IswNumsPhoto) if len(rs(IswNumsUser))>=18 then imgtext55= left(rs(IswNumsUser),18)&... else imgtext55=rs(IswNumsUser) end if imgLink55=rs(IswNumsClass) end if rs.movenext k=k 1 next else response.write There is no data yet! end if %> <a target=_self href=javascript:goUrl()> <span class=f14b> <script type=text/javascript> imgUrl1=<%=imgUrl11%>; imgtext1=<%=imgtext11%> imgLink1=escape(<%=imgLink11%>); imgUrl2=<%=imgUrl22%>; imgtext2=<%=imgtext22%> imgLink2=escape(<%=imgLink22%>); imgUrl3=<%=imgUrl33%>; imgtext3=<%=imgtext33%> imgLink3=escape(<%=imgLink33%>); imgUrl4=<%=imgUrl44%>; imgtext4=<%=imgtext44%> imgLink4=escape(<%=imgLink44%>); imgUrl5=<%=imgUrl55%>; imgtext5=<%=imgtext55%> imgLink5=escape(<%=imgLink55%>); var focus_width=200 var focus_height=160 var text_height=18 var swf_height = focus_height text_height <%if Num_total=1 then%> var pics=imgUrl1 var links=imgLink1 var texts=imgtext1 <%elseif Num_total=2 then%> var pics=imgUrl1 | imgUrl2 var links=imgLink1 | imgLink2 var texts=imgtext1 | imgtext2 <%elseif Num_total=3 then%> var pics=imgUrl1 | imgUrl2 | imgUrl3 var links=imgLink1 | imgLink2 | imgLink3 var texts=imgtext1 | imgtext2 | imgtext3 <%elseif Num_total=4 then%> var pics=imgUrl1 | imgUrl2 | imgUrl3 | imgUrl4 var links=imgLink1 | imgLink2 | imgLink3 | imgLink4 var texts=imgtext1 | imgtext2 | imgtext3 | imgtext4 <%elseif Num_total=5 then%> var pics=imgUrl1 | imgUrl2 | imgUrl3 | imgUrl4 | imgUrl5 var links=imgLink1 | imgLink2 | imgLink3 | imgLink4 | imgLink5 var texts=imgtext1 | imgtext2 | imgtext3 | imgtext4 | imgtext5 <%end if%> document.write('<object classid=clsid:d27cdb6e-ae6d-11cf-96b8-444553540000 codebase=http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0 width=' focus_width ' height=' swf_height '>'); document.write('<param name=allowScriptAccess value=sameDomain><param name=movie value=focus.swf><param name=quality value=high><param name=bgcolor value=#F0F0F0>'); document.write('<param name=menu value=false><param name=wmode value=opaque>'); document.write('<param name=FlashVars value=pics=' pics '&links=' links '&texts=' texts '&borderwidth=' focus_width '&borderheight=' focus_height '&texttheight=' text_height '>'); document.write('<embed src=pixviewer.swf wmode=opaque FlashVars=pics=' pics '&links=' links '&texts=' texts '&borderwidth=' focus_width '&borderheight=' focus_height '&texttheight=' text_height ' menu=false bgcolor=#F0F0F0 quality=high width=' focus_width ' height=' focus_height ' allowScriptAccess=sameDomain type=application/x-shockwave-flash pluginspage=http://www.macromedia.com/go/getflashplayer />'); document.write('</object>'); </script> </span></a><span id=focustext class=f14b> </span> |
Share: How to generate html pages for asp dynamic pages There are many news systems that generate html, but they all use templates. This function saves the html code generated by the asp page into an html file, so there is no need to change the original page and easily completes a news system that generates html.