从ASP加载的URL中删除http://前缀 [英] Removing http:// prefix from ASP loaded URL
本文介绍了从ASP加载的URL中删除http://前缀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的页面在这里完整列出了广告商的URL,但是我不确定如何删除http://前缀.
My page here has advertisers' URLs listed in full, but I'm not sure how to remove the http:// prefix.
这是代码:
<% if instr("abc"&rsAdvert("WebAddress"),"http:")>0 then
shttp=""
else
shttp="http://"
%>
<li class="weblink">
| <a onclick="pageTracker._trackPageview('/TOP_FULL_ADVERT_WEBSITE/<%=shttp%><%=rsAdvert("WebAddress")%>');"
href='<%=shttp%><%=rsAdvert("WebAddress")%>'
target='_blank' rel='nofollow'>
<%=rsAdvert("WebAddress")%></a></li>
<% end if %>
任何想法都很棒.
推荐答案
您需要更改以下代码:
<a href="url">text</a>
^^^^
您的链接看起来像这样:
You link looks like this:
<a
onclick="pageTracker._trackPageview('/TOP_FULL_ADVERT_WEBSITE/<%=shttp%><%=rsAdvert("WebAddress")%>');"
href='<%=shttp%><%=rsAdvert("WebAddress")%>'
target='_blank'
rel='nofollow'>
<%=rsAdvert("WebAddress")%>
</a>
因此,您需要更改</a>
之前的位,特别是末尾的该位
so you need to chnage the bit just before the </a>
, specifically this bit at the end
><%=rsAdvert("WebAddress")%></a>
^^^^^^^^^^^^^^^^^^^^^^^^^^^
一些不包含http://
to some variable which does not include the http://
这可能有效,不确定经典的asp语法
this might work, not sure of classic asp syntax
><%=rsAdvert("WebAddress").replace("http://", "")%></a>
这篇关于从ASP加载的URL中删除http://前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文