iFrame URL参数到Wordpress中的


iFrame URL parameter to an in Wordpress?

我有一个页面,它嵌入了一个外部页面的iframe。我想找到邮政编码

这是我的iframe:

<iframe src="http://mortgagerates.icanbuy.com/?zip=" width="1020" height="1200">

http://mortgagerates.icanbuy.com/?zip=10458(主站点)

但我想我的框架和我的浏览器网址相同如下:

http://www.mysite.com/?zip=10458(我想要那样的)

这在wordpress中可能吗?怎样

请检查一下。我希望能工作…

<iframe src="http://mortgagerates.icanbuy.com/?zip" width="1020" height="1200"  class="iframe-wrapper">

并添加这个jQuery。就是这样!

<script type="text/javascript">
     $(function() {
    var search = window.location.search;
    search = search.replace("?","&");
    $(".iframe-wrapper").attr("src", $(".iframe-wrapper").attr("src")+search);
    });
</script>

这是ajax页面。您想要使用ajax。

http://mortgagerates.icanbuy.com/ajax/rates-search?callback=jQuery17209362620610679678_1385958692723&source=1&results_count=0&period=PERIOD_FIXED_30YEARS&state=33&property_type=34&occupancy=49&fico=740&points=1.5&currently_working=Yes&property_interested=Yes&show_fha=0&cashout=0&city=10458&valoans=0&militaryaff=1&hadvabefore=0&rate_lock=99&loan=200000&transaction=54&ltv=80&cltv=80&DO_UPDATE_WRITE=0&id=d4ea9f8db0477778&external=0&_=1385958692873

您需要将您的zipcode传递到city=10458。其返回json编码格式。您只需将其解析到设计中即可。