1
我想用的iframe「X-框架 - 選項」到「SAMEORIGIN」谷歌地圖MVC
<script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion.js">
<noscript>
<div style="display: inline;">
<img height="1" width="1" style="border-style: none;" alt="" src="https://www.googleadservices.com/pagead/conversion/''/?label='';guid=ON&script=0" />
</div>
</noscript>
<div class="mapContainer" style="width: 251px; height: 202px;">
<iframe id="iGmap" width="251" height="202" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="@Html.Raw(Model.CurrentBranch.GoogleMapURLWithZoomSet)">
</iframe>
</div>
凡
src='http://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid=''&ll='',''&spn='',''&output=embed&z=4'
上面的代碼我顯示谷歌地圖用下面的代碼使用在cshtml頁面 但給一個錯誤,像拒絕顯示'https://maps.google.com/maps/ms?ie=UTF8&hl=en&msa=0&msid= ... & ll =,& spn =,&輸出=嵌入& z = 6',因爲它設置了'X-Frame-Optio ns'改爲'SAMEORIGIN'。