我正在制作一個學校游戲解鎖網站,并且正在使用 about:blank cloaking。我需要在 about:blank 網站上添加一個標題,這樣老師就不會看到我在做什么。
這是重定向的代碼。
<html>
<head>
<body onclick="MyWindow1()">Click here to start</body>
</head>
<script>
(url);
var newWin = window.open
function MyWindow1(){
var win = window.open()
var iframe = win.document.createElement('iframe')
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = "none";
iframe.src = "./Main.html";
win.document.body.appendChild(iframe)
location.replace("https://www.google.com/")
}
</script>
</html>
這就是 Main.html 代碼的樣子。這是關于:空白網站。
<html>
<head>
<body onclick="MyWindow1()">Click here to start</body>
</head>
<script>
(url);
var newWin = window.open
function MyWindow1(){
var win = window.open()
var iframe = win.document.createElement('iframe')
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = "none";
iframe.src = "./Main.html";
win.document.body.appendChild(iframe)
location.replace("https://www.google.com/")
}
</script>
</html>
如果我只運行第二個檔案,它不會執行 about:blank 但會顯示標題。謝謝!
uj5u.com熱心網友回復:
您可以使用設定新視窗的標題win.document.title = "Your Title Here";
例子:
<script>
(url);
var newWin = window.open
function MyWindow1() {
var win = window.open()
win.document.title = "Your Title Here";
var iframe = win.document.createElement('iframe')
iframe.style.width = "100%";
iframe.style.height = "100%";
iframe.style.border = "none";
iframe.src = "./Main.html";
win.document.body.appendChild(iframe);
location.replace("https://www.google.com/");
}
</script>
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/528217.html
標籤:html网络伪装
