开发者

Changing permanently html values using javascript?

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.ac开发者_高级运维tiveDef.href = "pic2.html";

}


If by "permanently" you mean changing the HTML file (on the server), the answer is no, you cannot do that with client-side JavaScript.


No, this is not possible.

Javascript in the browser is insulated from the local file system (sandboxed) for security reasons.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜