如何阻止我的网站加载其他网站iframe

时间:2017-06-01 22:30:57

标签: javascript php jquery html iframe

如何从iframe屏蔽我的网站?对于实例,YouTube无法显示在iframe中,它会说明此网站的所有者已阻止iframe。我知道像这样的元标记方式

    <meta http-equiv="X-Frame-Options" content="deny"> 

howerver对我不起作用,有没有其他方式,我宁愿使用javascript和html没有apachi php ajex或其他请。这是我希望阻止我网站的youtube iframe。也没有.htaccess

   <!DOCTYPE html>
<html>
<head>
<title>YouTube</title>
</head>
<body>
<iframe width="50%" height="50%" src="http://www.youtube.com" >
</iframe>
</body>

1 个答案:

答案 0 :(得分:0)

我的解决方案是放入public void VisoresPacsController(string ipAddress, string aeTitle, string accessId, int port) { /* this.ipAddress = ipAddress; this.aeTitle = aeTitle; this.accessId = accessId; this.port = port; visores.Add(new VisorCommandLine("Radiant", "")); ///new DicomCStoreRequest. */ DicomClient client = new DicomClient(); var query = DicomCFindRequest.CreateImageQuery("1.2.250.1.31.2.723.19980722.113224.11597", "1.2.250.1.31.3.723.19980722.113224.11597"); client.AddRequest(query); query.OnResponseReceived = onResponse; client.Send("70.38.12.40", 4242, false, "THS", "ORTHANC"); } public void onResponse(DicomCFindRequest req, DicomCFindResponse res) { DicomDataset dataset = res.Dataset; dataset.Add(DicomTag.SOPClassUID, "1.2.250.1.31.4.723.19980722.113224.11597"); //dataset.Add(DicomTag.StudyInstanceUID, GenerateUid()); //dataset.Add(DicomTag.SeriesInstanceUID, GenerateUid()); //dataset.Add(DicomTag.SOPInstanceUID, GenerateUid()); DicomFile dicomFile = new DicomFile(dataset); dicomFile.Save(@"C:\Users\Developer 13\Desktop\dicomfile.dcm"); } head代码

body