เนื้อหาของบทความนี้ง่ายมาก ฉันจะสรุปคำสั่งทั่วไปสำหรับ JavaScript เพื่อรับข้อมูลปัจจุบัน
console.info ("document.url =" + document.url);
console.info ("document.location.href =" + document.location.href);
//console.info("document.base= " + document.base); // นี่ผิด!
console.info ("document.location =" + document.location);
console.info ("self.location.href =" + self.location.href);
console.info ("top.location.href =" + top.location.href);
console.info ("location.hostname =" + location.hostname);
console.info ("window.location.host =" + window.location.host);
console.info ("window.location.pathName =" + window.location.pathName);
นั่นคือทั้งหมดที่ฉันจำได้ในขณะนี้ฉันจะอัปเดตในภายหลัง^_^