我在下面的代码中出现错误...
<!DOCTYPE html>
<html>
<head>
<META HTTP-EQUIV="Access-Control-Allow-Origin" CONTENT="https://www.abcd.xyz">
</head>
<body bgcolor="#282c34" text="#43a199" >
<iframe src="2739.pdf#zoom=Fit" id="ifrmCast" type="application/pdf" width="100%" style="height:95vh;"></iframe>
<button onclick="ifrmLoad();"> Click Mee... </button>
<script>
function ifrmLoad() {
alert("called");
var iframe = document.getElementById("ifrmCast");
var elmnt = iframe.contentWindow.document.getElementsByClassName("canvasWrapper");
elmnt.style.display = "none";
alert(elmnt.innerHTML);
}
</script>
</body>
</html>
在此处找不到任何解决方案... 我试过了。