tianyunperfect 2 năm trước cách đây
mục cha
commit
fe07215f3e
1 tập tin đã thay đổi với 6 bổ sung2 xóa
  1. 6 2
      simple-demo/open.html

+ 6 - 2
simple-demo/open.html

@@ -15,8 +15,12 @@
     ];
 
     for (let i = 0; i < urls.length; i++) {
-        window.open(urls[i], "_blank");
+        if (i === urls.length - 1) {
+            window.open(urls[i], "_self");
+        } else {
+            window.open(urls[i], "_blank");
+        }
+
     }
-    window.close();
 </script>
 </html>