判断URL是否能被链接

判断url是否能被正确链接

function checkUrl(url, name)
{
$.ajax({
url: url,
type: "get",
dataType : 'jsonp',
crossDomain : true,

complete: function(xhr, textStatus) {
if( xhr.readyState === 4 && xhr.status === 200 )
{
代表能访问链接成功
}
}
});
}

猜你喜欢

转载自www.cnblogs.com/xinyouhunran/p/9555971.html
今日推荐