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

yuanke_org
yuanke 9 years ago
parent 46860a838b
commit fcaa9666e2

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

Loading…
Cancel
Save