【发布时间】:2020-10-05 06:01:41
【问题描述】:
当用户单击 iFrame 时,如何将 iFrame 重定向到另一个 html 网页?
iFrame实际上是一个html页面。当我点击iFrame时,我希望它重定向到另一个html页面。
我的代码:
h1 {
text-align: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
h2{
text-align: center;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: #feb236;
}
iframe {
border: 2px solid black;
}
body{
height: 175vh;
}
div{
border-width: 0 2px;
border-style: solid;
position: fixed;
top: 0;
bottom: 0;
right: 400px;
left: 400px;
z-index: -1;
}
<!DOCTYPE html>
<html>
<head>
<title>Plagiarism</title>
<h1><u>PLAGIARISM</u></h1>
<div></div>
</head>
<body>
<h2 style=>What is Plagiarism?</h2>
<p align="center"><iframe width="400" height="250"></iframe></p>
<h2>What is Plagiarism in Computer Science?</h2>
<p align="center"><iframe width="400" height="250"></iframe></p>
<h2>Famous Cases of Plagiarism</h2>
<p align="center"><iframe width="400" height="250"></iframe></p>
<h2>Punishment for Plagiarism in US</h2>
<p align="center"><iframe width="400" height="250"></iframe></p>
</body>
</html>
【问题讨论】:
标签: javascript html css iframe frame