django----JSONP知识回顾

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<input type="button" onclick="jsonpRequest();" value="跨域请求">
<script>
    function jsonpRequest() {
        tag=document.createElement('script');
        tag.src='http://www.jxntv.cn/data/jmd-jxtv2.html?callback=list&_=1454376870403';//list[...  ]
        document.head.appendChild(tag)
    }
    function list(arg) {
        console.log(arg)
        document.head.removeChild(tag);
    }
</script>

</body>
</html>

http://www.cnblogs.com/wupeiqi/articles/5369773.html    532

原文地址:https://www.cnblogs.com/Mengchangxin/p/9951714.html