小编Mat*_*ala的帖子

在webix UI模式中表单数据

我正在使用Webix UI模式,这就是我使用它的方式:

this.add = function () {
scrollArea.css("overflow", "hidden");
$.ajax({
	type: "GET",
	url: "/detail/create",
	success: function (form) {
		webix.message.keyboard = false;
		webix.modalbox({
			title: "New detail",
			buttons: ["Accept", "Decline"],
			text: form,
			width: 400,
			callback: function (result) {
				switch (result) {
					case "0":
						addDetail();
						break;
					case "1":
						break;
				}
				scrollArea.css("overflow", "auto");
			}
		});
	}
});
function addDetail() {
	$.ajaxSetup({
		headers: {
			'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
		}
	});
	$.ajax({
		type: "POST",
		url: "/detail/store",
		data: $('#detail_add').serialize(),
		contentType: "JSON",
		processData: false,
		success: function () {
		}
	}); …
Run Code Online (Sandbox Code Playgroud)

javascript jquery webix

7
推荐指数
1
解决办法
721
查看次数

错误:在框架中,因为它将“X-Frame-Options”设置为“sameorigin”

我得到了以下error的时候我实现patent search googleiframe

in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Run Code Online (Sandbox Code Playgroud)

in a frame because it set 'X-Frame-Options' to 'sameorigin'.
Run Code Online (Sandbox Code Playgroud)
document.getElementById("go_search").onclick = function() {
  myFunction();
};

function myFunction() {
  var patent_content = document.getElementById("patent_content").value;

  var html_content = '<iframe crossorigin="anonymous" src="https://patents.google.com/?q=' + patent_content + '&embedded=true" height="200" width="300"></iframe>';
  document.getElementById("result").innerHTML = html_content;
}
Run Code Online (Sandbox Code Playgroud)

请帮我修复它。

提前致谢。

错误: 在 Chrome 中

patent.html:1 Refused to display 'https://patents.google.com/?q=fghfhfghfg' in a frame because it set 'X-Frame-Options' to 'sameorigin'.
patent.html:24 GET https://patents.google.com/?q=fghfhfghfg net::ERR_BLOCKED_BY_RESPONSE …
Run Code Online (Sandbox Code Playgroud)

javascript google-patent-search

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

javascript ×2

google-patent-search ×1

jquery ×1

webix ×1