JS sentence URL is available (JS sentence segment network is not usable)

Source: Internet
Author: User

The following personal tests are possible:


Compatible with all browsers, with jquery, can be used to determine whether a segment URL is available, you can also determine whether the network is unavailable (premise: If the URL is available, return is not 200, it means that the network is not available, can be used as a network of the sentence)


$.ajax ({

URL: ' http://some.url.com ',
Type: ' GET ',
Complete:function (response) {
if (Response.Status = = 200) {
Alert (' effective ');
} else {
Alert (' invalid ');
}
}

});


I very much like to do development, their own web-related learning website-Learn also know the site: www.xueyizhi.com, the corresponding forum: bbs.xueyizhi.com, technical QQ Group: 175603095, we are very welcome to come to study together!

JS sentence URL is available (JS sentence segment network is not usable)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.