js的自动转换URL函数autoUrl加上个异常处理

This commit is contained in:
yuanke 2016-11-23 13:29:02 +08:00
parent 40c7afbc38
commit 9720f84fce
1 changed files with 15 additions and 2 deletions

View File

@ -1706,7 +1706,14 @@ function autoUrl(id){
} }
return reStr ; return reStr ;
}); });
$(this).html(html); try{
$(this).html(html);
}
catch (e)
{
console.log(e.name + ": " + e.message);
}
} }
}); });
} }
@ -1725,7 +1732,13 @@ function autoUrl(id){
} }
return reStr ; return reStr ;
}); });
$("#"+id).html(html); try{
$("#"+id).html(html);
}
catch (e)
{
console.log(e.name + ": " + e.message);
}
} }
if(!(!!window.ActiveXObject || "ActiveXObject" in window)){ if(!(!!window.ActiveXObject || "ActiveXObject" in window)){
autoMedia(id); autoMedia(id);