参考:https://stackoverflow.com/questions/15005500/loading-cross-domain-endpoint-with-jquery-ajax
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
overflow: auto;
}
</style>
</head>
<body>
<!--<object class="inset" type="text/x-scriptlet" data="https://mp.weixin.qq.com/s/vUaCwSEIYlGpf1yZ0HdNCw" width=100%
height=100%></object>-->
<div id="html"></div>
<div>
这里放置自定义内容
</div>
</body>
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>
<script>
$.ajaxPrefilter(function (options) {
if (options.crossDomain && jQuery.support.cors) {
var http = (window.location.protocol === 'http:' ? 'http:' : 'https:');
options.url = http + '//cors-anywhere.herokuapp.com/' + options.url;
//options.url = "http://cors.corsproxy.io/url=" + options.url;
}
});
$.get(
'https://mp.weixin.qq.com/s/vUaCwSEIYlGpf1yZ0HdNCw',
function (response) {
$("#html").html(response);
});
</script>
</html>