iframe内嵌的网页如何知道外面的网页地址参数?
例如 a.php?p1=xxx&p2=xxx里面嵌入 <iframe src=test.php>
test.php 如何知道外面的 a.php的参数呢?js实现或是别的方式实现都可以啊:)
例如 a.php?p1=xxx&p2=xxx里面嵌入 <iframe src=test.php>
test.php 如何知道外面的 a.php的参数呢?js实现或是别的方式实现都可以啊:)
<iframe src=test.php?p1=<? echo $p1;?>&p2=<? echo $p2;?> >
楼上的方法更快些
document.write(parent.location.href);