- <script src="js/jquery.min.js" type="text/javascript" charset="gbk" ></script>
- <script>
- function get_url_status(){
- $.ajax({
- url: '22.php',
- type: 'POST',
- complete: function(response) {
- if(response.status == 200) {
- alert('有效');
- } else {
- alert('无效');
- }
- }
- });
- }
- </script>
- <input name="2" type="button" value="检测" onclick="get_url_status()" />
以上就是Ajax检测网址是否有效的详细内容,更多关于Ajax检测网址是否有效的资料请关注九品源码其它相关文章!