- <script type="text/javascript" src1="js/jquery-1.7.2.min.js"></script>
- <script type="text/javascript" src1="jquery.sha1.js"></script>
- <script>
- $(function() {
- var now = Date.now();
- var appKey = $.sha1("A6973182980986" + "UZ" + "21623899-1027-34BC-9789-762EA7B8E532" + "UZ" + now) + "." + now;
- $.ajax({
- url: "https://d.apicloud.com/mcm/api/person/55274ec7194d4fab11da9b1b",
- method: "get",
- headers: {
- "Content-type": "application/json;charset=UTF-8",
- "X-APICloud-AppId": "A6973182980986",
- "X-APICloud-AppKey": appKey
- },
- dataType: "json",
- success: function(data, status, header) {
- alert(data.name);
- },
- error: function(a, b, c) {
- alert(b);
- }
- });
- });
- </script>
- //该片段来自于http://www.codesnippet.cn/detail/2004201512339.html
来源: http://www.codesnippet.cn/detail/2004201512339.html