|
本帖最后由 fteair 于 2018-3-7 17:51 编辑
- <script type="text/javascript">
- var obj = {
- username: "qin",
- password: "12"
- }
- $.ajax({
- // url: "http://www.jkera.cn/dianshiguo/data.php",
- url: "http://www.miaos.me/hongxiu/ceshi.aspx",
- data:obj,
- async: true,
- dataType: "jsonp",
- success: function(data) {
- console.log(data)
- }
- });
- </script>
复制代码
服务端代码- string callback = Request.QueryString["callback"].ToString();
- string json = "";
- json += "{\"data\":[";
- json += "{\"timestamp\":\"123\"}";
- json += "]}";
- string result = callback + "(" + json + ")";
复制代码
|
|