自动跳转lnprivate窗口页面

yang 0 Reputation points
2024-03-22T08:33:13.24+00:00

以下是用于HTML文件的自动跳转lnprivate窗口代码,无法正常跳转到lnprivate窗口页面

<!DOCTYPE html>

<html>

<head>

<title>跳转至 lnPrivate 私密窗口</title>

</head>

<body>

<button onclick="openInPrivate()">在 lnPrivate 窗口打开</button>

<script type="text/javascript">

function openInPrivate() {

var url = "microsoft-edge:https://accounts.google.com -inprivate";

var isSupported = window.msLaunchUri && window.msLaunchUri(url, null, function(result) {

  if (!result) {

    console.error("无法打开 lnPrivate 窗口");

    // 如果无法打开 lnPrivate 窗口,可以尝试在普通窗口中打开

    window.location.href = "https://accounts.google.com";

  }

});

if (!isSupported) {

  console.error("lnPrivate 功能不受支持");

  // 如果不支持 lnPrivate,直接在普通窗口中打开链接

  window.location.href = "https://accounts.google.com";

}
```  }

</script>

</body>

</html>
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,005 questions
{count} votes