scripts may close only the windows that were opened by it 瀏覽器JS控制無法關閉當前頁面
不是window.open形式打開的子頁面用js的window.close在chrome下就會提示關不了。
網上的很多解決方法都是把當前頁面為空,在IE和360瀏覽器也不能直接關閉頁面,翻到stack overflow的解決方案:
if(navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Chrome") != -1) { open(location, ‘_self‘).close(); window.location.href="about:blank"; window.close(); }else { window.opener = null; window.open("", "_self"); window.close(); open(location, ‘_self‘).close(); }
open(location, ‘_self‘).close(); 加了這個非火狐和chrome就能直接把當前頁面關閉了。
scripts may close only the windows that were opened by it 瀏覽器JS控制無法關閉當前頁面
相關推薦
scripts may close only the windows that were opened by it 瀏覽器JS控制無法關閉當前頁面
解決方案 360瀏覽器 當前 火狐 就會 navigator opener ati hat 不是window.open形式打開的子頁面用js的window.close在chrome下就會提示關不了。 網上的很多解決方法都是把當前頁面為空,在IE和360瀏覽器也不能直接關閉
chrome close js 關閉當前頁面
Chrome瀏覽器如何呼叫js關閉當前頁面Ext.Ajax.request({ url: "Logout.aspx", params: { tag: "logout" }, success
Android: Only the original thread that created a view hierarchy can touch its views 異常
action 接收 如果 exc void 簡單使用 idg ror ucc 最近自己再寫一個小項目練手,創建一個線程從網絡獲取數據然後顯示在 recyclerView 上。寫好後發現頁面能夠顯示,但是有時候會把請求的數據顯示過來,有時候不會。點開 android moni
Error:Only the original thread that created a view hierarchy can touch its views
記錄: 錯誤:Only the original thread that created a view hierarchy can touch its views 在子執行緒更新UI 自己的手機型號為榮耀9青春版,不會出現這個問題,可是有的手機會出現這個問題 解決方法
9 Things You Can Do in the Windows 10 October 2018 Update That You Couldn't Do Before
In addition to pushing out a boatload of new Surface hardware yesterday, Microsoft also made the October 2018 update of Windows 10 generally available--it
【梅關西,這是我的一個祕密,再簡單不過的祕密:一個人只有用心去看,才能看到真實。】And now here is my secret, a very simple secret. It is only with the heart that one can
And now here is my secret, a very simple secret. It is only with the heart that one can see rightly.
android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a v
public class MainActivity extends AppCompatActivity { private Button mButton; private TextVi
錯誤:Only the original thread that created a view hierarchy can touch its views——Handler的使用(更新UI介面)
今天寫了一個更新UI的小例子,沒想到出了log列印了這樣一個錯誤:Only the original thread that created a view hierarchy can touch its views。goolgle了一下找到了原因。 原來android中相關
子執行緒呼叫invalidate()產生“Only the original thread that created a view hierarchy can touch its views.”原因分析
[TOC] 備註:本文基於sdk28, **ViewActivity頁面禁用了硬體加速(AndroidManifest.xml中添加了android:hardwareAccelerated="false")**。 # 1、異常出處 ViewActivity程式碼連結:https://gitee.com/282
What is the Windows Integrity Mechanism?(什麽是Windows完整性機制)
ech 管理員 tac p s configure hierarchy 重要 issue ide The Windows integrity mechanism is a core component of the Windows security architectu
關於check the manual that corresponds to your MySQL server version for the right syntax to use near
mysql今天在更新表的時候一直提示check the manual that corresponds to your MySQL server version for the right syntax to use near問題排查很久,數據庫版本沒有問題,語法也沒有問題,卻一直報錯最後排查發現是關鍵詞沖突
win10 安裝nodejs,報錯there is a problem in the windows installer package
nload 裝包 ack next org get 就是 技術分享 提示符 1. 在開始面板找到命令提示符,右鍵選擇“以管理員身份運行” 2. 進入到安裝包的文件目錄內 3. 回到命令提示符窗口,運行安裝包名字 之後會跳出安裝提示,點擊運行 之後就一直next,就
MySQL check the manual that corresponds to your MySQL server version for the right syntax錯誤
bat sqli jdbc call wrap base defaults org dsta 今配置Mybatis框架測試的時候報了這個錯:以下是錯誤的信息:org.apache.ibatis.exceptions.PersistenceException: ### Err
解決“This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms”
policy font edi config 分享 his 內容 class crypto 解決“This implementation is not part of the Windows Platform FIPS validated cryptographic alg
Be Close To The Real World
color p s browser outer bject 能夠 oot res inject ps: 最近在學react和redux。用了幾天時間看了下,個人覺得react本身比較易懂,但是涉及到的各種中間件和api讓人腦闊疼(正好前段時間用vue+koa寫了個簡易的博客
docker build 報錯 The following signatures were invalid
構建映象的時候遇到 GPG error: https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 Release: The following signatures we
Error Code : 1064 You have an error in your SQL syntax; check the manual that corresponds to your My
轉自:https://blog.csdn.net/haha_66666/article/details/78444457 Query : select * from order LIMIT 0, 1000 Error Code : 1064 You have an error in your
How to Add “Open with Notepad” to the Windows Context Menu for All Files
If you want to open a file type not registered with Notepad, you have to click through several options to make it happen. This can be a hassle, so
《Procrastination Sucks—So Here’s The “Eat That Frog” Way to Powerful Productivity(拒絕拖延,今日吃蛙)》
文章標題:《Procrastination Sucks—So Here’s The “Eat That Frog” Way to Powerful Productivity(拒絕拖延,利用“吃掉青蛙”的方法提升我們的專注力)》 文章解析: -- 本篇文章主旨在於告訴我們如何專注於一件事情,作者認為專注於一件
linux mysql----You have an error in your SQL syntax; check the manual that corresponds to your MySQL
Mysql 語句毛病 (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use