Reputation: 105
Is it possible to change a html value permanently via javascript? I'm accessing a local file.
These are my codes:
function switchPic(){
top.topPage.activeDef = top.topPage.document.getElementById('h1');
top.topPage.activeDef.href = "pic2.html";
}
Upvotes: 1
Views: 785
Reputation: 499002
No, this is not possible.
Javascript in the browser is insulated from the local file system (sandboxed) for security reasons.
Upvotes: 0
Reputation: 6067
If by "permanently" you mean changing the HTML file (on the server), the answer is no, you cannot do that with client-side JavaScript.
Upvotes: 3