|
楼主 |
发表于 2011-6-24 23:49:30
|
显示全部楼层
用超链接控制显示,并在同一个层中显示出其链接的网页。
请举例,谢谢。
最佳答案 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=gb2312">
<style type="text/css">
#linkdiv{
width:400px;
height:300px;
background:yellow;
}
</style>
<script type="text/javascript">
var xmlHttp;
function createXmlHttp()
{
if (window.XMLHttpRequest)
xmlHttp = new XMLHttpRequest();
else
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
function update()
{
if(xmlHttp.readyState == 4)
{
results = xmlHttp.responseText;
linkdiv.innerHTML=results;
}
}
function send(linkurl)
{
createXmlHttp();
xmlHttp.onreadystatechange = update;
xmlHttp.open("get",linkurl, true);
xmlHttp.send(null);
}
</script>
</head>
<body>
www.baidu.com
www.google.cn
<div id="linkdiv">
</div>
</body>
</html>
以上为网上找的,不知道能不能实现图片的叠加? |
|