Selaa lähdekoodia

git-svn-id: https://192.168.57.71/svn/jsgkj@1017 931142cf-59ea-a443-aa0e-51397b428577

ld_liqk 8 vuotta sitten
vanhempi
commit
175ca0a735
1 muutettua tiedostoa jossa 48 lisäystä ja 0 poistoa
  1. 48 0
      gkjsjy/trunk/WebContent/test.jsp

+ 48 - 0
gkjsjy/trunk/WebContent/test.jsp

@@ -0,0 +1,48 @@
+<%@ page language="java" contentType="text/html; charset=UTF-8"
+    pageEncoding="UTF-8"%>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Insert title here</title>
+<script src="static/js/jquery-1.11.1.js"></script>
+<script type="text/javascript">
+var urls = new Array();
+urls.push(["http://10.1.30.114:8080/jsjy","省局"]);
+urls.push(["http://localhost:8080/jygl","测试"]);
+function IsLoad(_url,_name,fun){
+	  $.ajax({
+	      url:_url,
+	      type:"get",
+	      success:function(){
+	        //说明请求的url存在,并且可以访问
+	        if($.isFunction(fun)){
+	                fun(true,_name);
+	              }
+	      },
+	      error:function(){
+	    	//说明请求的url不存在
+	          if($.isFunction(fun)){
+	            fun(false,_name);
+	          }
+	      }
+	    });
+	}
+	$(document).ready(function() {
+		for(var i=0;i<urls.length;i++){
+			IsLoad(urls[i][0],urls[i][1],function(res,name){
+			    if(res){
+			      	$("body").html($("body").html()+"<br>"+name+'可以访问');
+			    }else{
+			    	$("body").html($("body").html()+"<br>"+name+'error');;
+			    }
+			});
+		}	
+	});
+	
+</script>
+</head>
+<body>
+
+</body>
+</html>