日期:2014-05-18  浏览次数:20653 次

有没有将url转换成超级链接的代码
比如   我输入www.abc.com能在叶面显示的时候能够自动变成超级链接,要求服务器端实现。

能有现成代码最好。。谢谢先

------解决方案--------------------
请问你输入的网址是在地址栏还是还是表单中中,下面是一段在表单中输入转换成 超链接的代码:
<%@ page contentType= "text/html; charset=GBK "%>

<html>
<head>
<title> URL转换超链接 </title>
<link href= "/defaultroot/skin/blue/style.css " rel= "stylesheet " type= "text/css " />

</head>
<body onload= "resizeWin(650,300); " class= "MainFrameBox Pupwin ">

<table width= "100% " border= "0 " cellpadding= "10 " cellspacing= "0 " class= "docBoxNoPanel ">
<form name= "form1 " action= "# " method= "POST ">
<tr>
<td colspan= "2 ">
超级链接: <%if(request.getParameter( "url ")!=null){out.print( " <a href= 'http:// "+request.getParameter( "url ")+ " '> "+request.getParameter( "url ")+ " </a> ");}%>
</td>
</tr>
<tr>
<td width= "70 " nowrap= "nowrap "> URL: </td>
<td >
<input name= "url " type= "text " class= "inputText " style= "width:100% "/>
</td>

</tr>
<tr>
<td colspan= "2 ">
<button class= "btnButton4font " onclick= "javascript:form1.submit(); "> 保存退出 </button>
</td>
</tr>
</form>
</table>
</body>
</html>
------解决方案--------------------
不明白你想干什么,不就是拼url嘛
------解决方案--------------------
你可以搜索 jsp ubb
------解决方案--------------------
帮顶~
------解决方案--------------------
正则表达式...
------解决方案--------------------
那就是filter了。