KE内容自动识别网址加上超链接时把颜色也加上

This commit is contained in:
yuanke 2016-05-25 10:37:35 +08:00
parent 46860a838b
commit fcaa9666e2
1 changed files with 4 additions and 4 deletions

View File

@ -1327,10 +1327,10 @@ function autoUrl(id){
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
}
return reStr ;
@ -1346,10 +1346,10 @@ function autoUrl(id){
var reStr = full;
if (full.length > 0){
if (full.indexOf("://") >= 0){
reStr = "<a target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'"+full+"'"+">"+full+"</a>";
}
else{
reStr = "<a target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
reStr = "<a style='color:#15bccf' target='_Blank' href="+"'http://"+full+"'"+">"+full+"</a>";
}
}
return reStr ;