Firefox와 innerhtml
에 문제가 있습니다. 그것이 작동하지 않는 이유를 알아낼 수 없습니다 :/크롬, 오페라, IE, 사파리가 잘 작동하지만, 파이어 폭스 ... 내 코드, CSS의 조금, 하나의 기능과 몸의Mozilla Firefox innerhtml이 작동하지 않습니다.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
<title>Dokument bez názvu</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/styl.css">
<script type='text/javascript' src='js/jquery-1.9.1.js'></script>
<style>
#displaybox
{
z-index: 10000;
filter: alpha(opacity=100); /*older IE*/
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); /* IE */
-moz-opacity: 1; /*older Mozilla*/
-khtml-opacity: 1; /*older Safari*/
opacity: 1; /*supported by current Mozilla, Safari, and Opera*/
position: fixed;
top: 20px;
left: 0px;
width: 100%;
height: 100%;
color: #FFFFFF;
text-align: center;
vertical-align: middle;
}
body
{
font-family: Calibri;
}
.black_overlay
{
visibility: hidden;
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background-color: black;
z-index: 1001;
-moz-opacity: 0.7;
opacity: .70;
filter: alpha(opacity=70);
}
</style>
<script>
function clicker() {
var thediv = document.getElementById('displaybox');
if (thediv.style.display == "none") {
thediv.style.display = "";
thediv.innerHTML = "<embed src='prohlidka.html' height='638' width='1024' ></embed>";
var thelay = document.getElementById('fade');
thelay.style.visibility = "visible";
} else {
thediv.style.display = "none";
thediv.innerHTML = '';
var thelay = document.getElementById('fade');
thelay.style.visibility = "hidden";
}
return false;
}
</script>
</head>
<body>
<div id="fade" class="black_overlay">
</div>
<div id="displaybox" style="display: none; overflow: visible">
</div>
<a id="otevrit" href='#' onclick='return clicker();'>Virtuální mapa</a>
</body>
합니다. 내가 말했듯이, 다른 브라우저가 잘 작동합니다. 그들은 정확히 내가 필요로하는 정확히 innerhtml
를 보여줍니다. 하지만 파이어 폭스는 그렇지 않다. 검은 색 오버레이는 잘 작동한다. 자바 스크립트를 검사 할 때 아무런 오류가 없습니다.
이 코드도 실행했는데 정상적으로 작동합니다. – bergie3000
나는 embed를 iframe으로 대체했으며 잘 작동합니다. D 정말 고마워요. 그것도 내 다른 문제를 해결^^ – user3197269
@ user3197269 : 도움이 된 것을 기쁘게 :) –