87,907
社区成员
发帖
与我相关
我的任务
分享
<a href="javascript:ShowUrl("<%=Url%>")"><%=Url%></a>
<!DOCTYPE HTML>
<html>
<head>
<meta charset="gb2312" />
<title></title>
</head>
<body>
<textarea id="test">
202.54.10.123
200.54.10.124
202.54.10.125
</textarea>
<br />
<script>
function $(el){
return typeof el == 'string' ? document.getElementById(el) : el;
}
var str = $('test').value;
var re = /.+\n/g;
alert(str.match(re))
str.replace(re, function($){
document.write( '<a href="http://'+$+'" target="_blank">'+$+'</a><br />' );
})
</script>
</body>
</html>
<a href="<%=Url%>"><%=Url%></a>