mahtab20011
پنج شنبه 04 اسفند 1390, 16:06 عصر
سلام
اگر بخواهيم به کمک jquery با زدن يک دکمه يک iframe را مشاهده کنيم وبا هر بار کليک کردن iframe به طور متوالي اضافه شود و زير هم نمايش داده شود چگونه امکان پذير است .من تا اين قسمت که براتون اين زير گذاشتم مشاهده مي کنيد اما براي داشتن iframe متوالي نمي دانم چکار کنم ؟
باتشکر
<html>
<head>
<meta http-equiv="refresh" content="30000">
<script type="text/javascript" src="../Desktop/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
a=html();
a+="iframe";
html(a);
});
$('#Button1').click(function() {
location.reload();
});
});
$('.panel').each(function() {
this.contentWindow.location.reload(true);
$('.panel').contentWindow.location.reload(true);
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 2px #c3c3c3;
}
div.panel
{
height:140px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<iframe src="http://www.w3schools.com" ></iframe>
</div>
First name: <input type="text" name="add" /><br />
<button class="flip">add</button>
<input id="Button1" type="button" value="refresh" />
</body>
</html>
اگر بخواهيم به کمک jquery با زدن يک دکمه يک iframe را مشاهده کنيم وبا هر بار کليک کردن iframe به طور متوالي اضافه شود و زير هم نمايش داده شود چگونه امکان پذير است .من تا اين قسمت که براتون اين زير گذاشتم مشاهده مي کنيد اما براي داشتن iframe متوالي نمي دانم چکار کنم ؟
باتشکر
<html>
<head>
<meta http-equiv="refresh" content="30000">
<script type="text/javascript" src="../Desktop/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".flip").click(function(){
$(".panel").slideToggle("slow");
a=html();
a+="iframe";
html(a);
});
$('#Button1').click(function() {
location.reload();
});
});
$('.panel').each(function() {
this.contentWindow.location.reload(true);
$('.panel').contentWindow.location.reload(true);
});
</script>
<style type="text/css">
div.panel,p.flip
{
margin:0px;
padding:5px;
text-align:center;
background:#e5eecc;
border:solid 2px #c3c3c3;
}
div.panel
{
height:140px;
display:none;
}
</style>
</head>
<body>
<div class="panel">
<iframe src="http://www.w3schools.com" ></iframe>
</div>
First name: <input type="text" name="add" /><br />
<button class="flip">add</button>
<input id="Button1" type="button" value="refresh" />
</body>
</html>