 |
สอบถามนิดนึงครับ....มีปัญหากับ.....JavaScripts....ครับ |
|
 |
|
|
 |
 |
|
พอจะมีตัวอย่างคำสั่งไหมครับ พอดี ไม่ทราบจริงๆ
|
 |
 |
 |
 |
Date :
2015-02-02 16:22:55 |
By :
linkinpoke |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
google หา
The other answers are outdated. The behavior of Chrome for window.open depends on where it is called from. See also this topic.
When window.open is called from a handler that was triggered though a user action (e.g. onclick event), it will behave similar as <a target="_blank">, which by default opens in a new tab. However if window.open is called elsewhere, Chrome ignores other arguments and always opens a new window with a non-editable address bar.
This looks like some kind of security measure, although the rationale behind it is not completely clear.
googleแปล 55+
คำตอบอื่น ๆ จะล้าสมัย พฤติกรรมของ Chrome สำหรับ window.open ขึ้นอยู่กับที่มันถูกเรียกจาก ดูเพิ่มเติมหัวข้อนี้
เมื่อ window.open ถูกเรียกจากการจัดการที่เรียกว่าการกระทำของผู้ (เช่นเหตุการณ์ onclick) ก็จะทำงานที่คล้ายกันเป็น <a target="_blank"> ซึ่งโดยค่าเริ่มต้นเปิดในแท็บใหม่ แต่ถ้า window.open เรียกว่าที่อื่น ๆ Chrome ไม่สนใจข้อโต้แย้งอื่น ๆ และมักจะเปิดหน้าต่างใหม่ที่มีแถบที่อยู่ที่ไม่สามารถแก้ไขได้
นี้ดูเหมือนว่าชนิดของมาตรการรักษาความปลอดภัยบางอย่างแม้ว่าเหตุผลที่อยู่เบื้องหลังมันจะไม่ชัดเจนอย่างสมบูรณ์
ส่วนตัวแล้วแนะนำใส่ไปเต็มๆน่าจะใช้ได้กำหนดขนาดและส่วนต่างๆ
newwindow = window.open(url, "_blank", "resizable=yes, scrollbars=yes, titlebar=yes, width=800, height=900, top=10, left=10");
|
ประวัติการแก้ไข 2015-02-02 16:26:03
 |
 |
 |
 |
Date :
2015-02-02 16:25:32 |
By :
meannerss |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ค้นหาพวก jQuery Fancybox หรือ jQuery Lightbox ในบทความมีอยู่ครับ
|
 |
 |
 |
 |
Date :
2015-02-02 16:26:08 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณมากนะครับ เดี๋ยวจะลองทำดูได้ผลยังไงจะรายงานให้ทราบครับผม
|
 |
 |
 |
 |
Date :
2015-02-02 16:30:00 |
By :
linkinpoke |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|