Выполнения follwing код в браузере:Javascript свойства местоположение не определено
for (propt in location) {
document.write("location property " + propt + " is currently: ");
document.write(screen[propt] + "<br />\n");
}
Все свойства не определены. Почему это происходит?
Вот результат:
location property assign is currently: undefined
location property replace is currently: undefined
location property reload is currently: undefined
location property ancestorOrigins is currently: undefined
location property origin is currently: undefined
location property hash is currently: undefined
location property search is currently: undefined
location property pathname is currently: undefined
location property port is currently: undefined
location property hostname is currently: undefined
location property host is currently: undefined
location property protocol is currently: undefined
location property href is currently: undefined
'местоположение [propt]', 'screen' не существует. – elclanrs