You don't declare the status
status variable.
Therefore, the global one (window.status
) is overwritten.
However, the HTML 5 spec defines that property as a DOMString:
interface Window : EventTarget {
attribute DOMString status;
};
Therefore, it has a setter (either exposed or internal) which stores the stringified value.
To fix it, just declare your local variable using the var
statement.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…