您好,我有几个问题。 我试图使我的可点击的div链接在内部链接中创建一个div弹出窗口,同时还有关于div内部链接的信息。
<html>
<title>lc</title>
<link rel="stylesheet" type="text/css" href="stylesheet.css" />
<div class="screen">
<script src="http://code.jquery.com/jquery-latest.js"></script>
</head><body>
<div class="left_index"><p><a href="http:/l_c/index.php">lc</a></p></div>
<?php
echo('<iframe src="' . $mysquaresarray[$randomno] . '" width="700" height="709" align="center" frameBorder="0"></iframe>');
?>
我的Css是
.screen{
position:absolute;
width:800px;
height:800px;
}
.left_index{
position:relative;
top:20px;
left:80px;
font-family: Futura, Optima, sans-serif;
font-size:30px;
margin:0px 0px, 0px,0px;
font-weight: thin;
}
以下是iframe的输入示例:
#four{
bottom: 175px;
left: 300px;
height:90px;
width:90px;
}
#four a {
display: block;
height:90px;
width:90px;
}
#five{
bottom: 100px;
left: 150px;
height:90px;
width:90px;
}
#five a {
display: block;
height:90px;
width:90px;
}
<div id="four"><a href="/course/s12pudt_2101e/projects/holden/Project5a/WEC.php" target="_blank" display:block;></a> </div>
<div id="five"></div>
</div>
<div class="fivetwo"><a href="http://www.youtube.com/watch?v=xqca9uKPeSg&feature=endscreen&NR=1" target="_blank" display:block;></a> </div>
</body>
</html>
非常感谢你。 iframe内部是随机生成的html页面。 html页面都包含可点击的div。我想点击这些div并将其链接到一个div内的弹出窗口的html页面,并有另一个div弹出窗口,其中包含有关该页面的信息。
编辑:我将如何开始为此编写代码? 我使用了slideToggle函数作为教授的建议,但我不确定如何让我的iframe中的div链接工作。 任何人都可以帮我这样做吗? 我该怎么做呢
答案 0 :(得分:-1)
$.get( "urlpath/test.html", function( data ) {
$( ".resultdiv" ).html( data );
});
对于跨源请求:
$.ajax({
crossOrigin: true,
url: url,
success: function(data) {
$( ".resultdiv" ).html( data );
}
});