For example: & lt; Td bgcolor="# FFFFFF" & gt; <% %=url & gt;
<% %=url & gt; The output is displayed when a web site, such as & lt; % %=url & gt; The output is: https://www.baidu.com
I want is the effect of www.baidu.com, that is, to remove http://this prefix?
Just learning ASP, what also don't understand?
I hope teachers detailed answer, thank you!
CodePudding user response:
Write a method to replace the line, the front-end js or backend js,Asp:
//call the place change to:
<% %=formatURL (url) & gt;
//any place with the back-end function code, simple copy for front end can also
<script language="javascript" runat="server" & gt;
The function formatURL (url) {
Reutrn (url | | ""). The replace (/^ HTTPS? : \ \///I, "");
}
</script>
CodePudding user response:
Don't work,CodePudding user response:
<%=Split (url, "//") (1) % & gt;CodePudding user response: