开发者

Changing permanently html values using javascript?

开发者 https://www.devze.com 2023-01-30 18:15 出处:网络
Is it possible to change a html value permanently via javascript? I\'m accessing a local file. These are my codes:

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

精彩评论

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