دریافت آدرس url از تگ iframe
دوستان عزیز سلام من مشکلی دارم که اگه کمک کنید ممنون میشم
من سورس کوچیک نوشتم که اینجا براتون میزارم
کد HTML:
<html>
<head>
</head>
<body dir="rtl">
<table><tr><td style="width: 75%;padding:3px;">
<iframe name="iman" id="iman" src ="http://url.com" style="width: 100%; height: 490px" border="0" frameborder="0" scrolling="no">
<p>Your browser does not support iframes.</p>
</iframe>
</td>
<td style="width: 612" class="style1" valign="top">
<a href="http:url3.com" target="iman">markaz</a><br>
<a href="http:url2.com" target="iman">amar</a><br>
<a href="http:url1.com" target="iman">farm1</a>
</td>
</tr></table>
<a href="#" onclick="javascript:alert(top.iman.document.URL);">get src</a>
</body>
</html>
اگه الان روی get src کلیک کنید آدرس رو آدرس src تگ iframe میده حالا اگه بر روی لینک های بالاش کلیک کنیم صفحه iframe تغییر میکنه ولی اگه دوباره روی get src کلیک کنید همون آدرس قبلی رو میده
میخوام بدونم چطوری آدرس جدید رو میشه ازش گرفت ممنون میشم کمک کنید
لطفا لطفا لطفا لطفا لطفالطفا لطفالطفالطفا
نقل قول: دریافت آدرس url از تگ iframe
ببخشید اون لینک آخری اینجوریه
کد HTML:
<a href="#" onclick="javascript:alert(document.getElementById('iman').src);>get src</a>
نقل قول: دریافت آدرس url از تگ iframe
نرم افزار حسابداری زمرد رو ببینید خیلی نرم افزارقوی و پرکاربردیه