日期:2014-05-16 浏览次数:21540 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<script type="text/javascript" src="jquery-1.9.1.js"></script>
<script type="text/javascript">
function Conn()
{
//alert("sss");
//$.get("site.asp?t="+Math.random(),
// {"action":"get"},
// function(json)
// {
// alert(json);
// });
$.ajax({
type: "get",
url: "site.asp?t="+Math.random(),
data:{action:"get"},
dataType: "json",
timeout:3000,
success: function (data) {
alert(data.site.province);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
alert("操作超时,请重新再试");
}
});
}
</script>
</head>
<body>
<button id="btn" onclick="Conn();">create</button>
</body>
</html>
<%
Response.charset="gbk"
str="{""site"":{""province"":""福建"",""city"":""厦门""}}"
response.write str
%>