我有一个跨域网站的iframe.我想读取iframe的DOM,我认为这是可能的,因为使用检查器,我甚至可以修改iframe的DOM.然而,我试图阅读它的每一种方式,我都遇到了相同的原始政策.我想要的只是从iframe加载到我的本地DOM中的内容.我以为它会那么简单$(document.body).find('iframe').html()
,但那会返回空字符串.
我真的希望有一种方法可以做到这一点,因为我过去几天一直在做的工作是基于这种可行性.
谢谢
我正在使用Blue Imp jQuery File Uploader将文件上传到MVC控制器.这适用于所有浏览器,除了Internet Explorer 8,其中data.submit()似乎没有被触发.我已经为'data'添加了一个监视器,我可以在那里看到该文件,但是表单根本没有被提交.下面是我的插件代码的精简版:
$('#fileupload').fileupload({
dataType: 'json',
url: "Upload/Index",
limitConcurrentUploads: 1,
sequentialUploads: true,
add: function (e, data) {
var filename = data.files[0].name;
data.context = $('<div class="progress-container"></div>').text(filename).appendTo ($('#filelistholder'));
// Add a progress bar for the file
$('<div class=\"margin-b-10 progress-halved\"><div class="bar"></div></div>').appendTo(data.context);
// Add a new click event for the Upload All button and enable it
$('#btnUploadAll').removeAttr('disabled').click(function () {
// Submit the file and remove the click event
data.submit();
$('#btnUploadAll').off('click');
});
// Show how many files have been selected
$('#overallProgressText').text($('.progress-container').size() …
Run Code Online (Sandbox Code Playgroud) jquery submit internet-explorer-8 blueimp jquery-file-upload