[英]iFrame URL parameter to an in Wordpress?
I have a page which has an iframe embed of an external page. 我有一个页面,其中嵌入了一个外部页面的iframe。 I want to find zip code 我想找到邮政编码
Here is my iframe: 这是我的iframe:
<iframe src="http://mortgagerates.icanbuy.com/?zip=" width="1020" height="1200">
http://mortgagerates.icanbuy.com/?zip=10458 (Main Site ) http://mortgagerates.icanbuy.com/?zip=10458 (主站点)
But i want i frame and my browser url same below: 但我希望我的框架和我的浏览器URL在下面相同:
http://www.mysite.com/?zip=10458 (I want something like that) http://www.mysite.com/?zip=10458 (我想要那样的东西)
Is this possible in wordpress? 这在wordpress中是否可行? how? 怎么样?
Please check it.. I hope work it... 请检查..我希望工作...
<iframe src="http://mortgagerates.icanbuy.com/?zip" width="1020" height="1200" class="iframe-wrapper">
And add this jQuery. 并添加此jQuery。 Thats It! 而已!
<script type="text/javascript">
$(function() {
var search = window.location.search;
search = search.replace("?","&");
$(".iframe-wrapper").attr("src", $(".iframe-wrapper").attr("src")+search);
});
</script>
This is ajax page. 这是ajax页面。 you want to use 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¤tly_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<v=80&cltv=80&DO_UPDATE_WRITE=0&id=d4ea9f8db0477778&external=0&_=1385958692873
you need to pass your zipcode
into city=10458
. 你需要将你的zipcode
传递到city=10458
。 its return json encoded format. 它返回json编码格式。 you simply parse this into your design. 你只需将它解析为你的设计。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.