日期:2014-05-17  浏览次数:20934 次

怎么提取链接中的id?
做网页的时候,想在同一个页内用锚链接中的id来分别点击后来显示数据库内容.但是不知道怎么提取那个id的数值.  
比如:  
Do   while   not   rs.eof   and   i <10  
i=i+1  
if   i> =1   then  
response.write   ( " <TR> ")  
response.write   ( " <TD> <a   href= '#?id= "   &   rs( "考号 ")&   " '> "   &   rs( "考号 ")   &   " </a> </TD> ")  
response.write   ( " <TD> <a   href= '#?id= "   &   rs( "考号 ")   &   " '> "   &   rs( "姓名 ")   &   " </a> </TD> ")  
response.write   ( " </TR> ")  
end   if  
rs.movenext  
Loop  

这个id的提取..直接让href= '#?id=id2,会在循环时直接出现真值..  

request.querystring( "id ")   在锚标记中提取不到.只提取url的..  

如果让id等于一个值,然后用保留的id值做为显示数据的依据,如果用语言,该怎么弄?怎么写??  

求高手指教..


------解决方案--------------------
Do while not rs.eof and i <10
i=i+1
if i> =1 then
response.write ( " <TR> ")
response.write ( " <TD> <a href= '?id= <%= rs( "考号 ") %> '> " & <%= rs( "考号 ") %> & " </a> </TD> ")
response.write ( " <TD> <a href= '?id= <%= rs( "考号 ") %> '> " & <%= rs( "姓名 ") %> & " </a> </TD> ")
response.write ( " </TR> ")
end if
rs.movenext
Loop


------解决方案--------------------
然后在用request.querystring( "id ")