javascript - Can a user permanently amend an HTML file through the browser? -


for example- user change actual code of html web browser using javascript prompt?

if had following code.

<html> <head> <script>var person = prompt("please enter name");</script> </head> <body> <p>this should user amendable</p> <p>this shouldn't</p> </body> </html> 

i don't mean store variable person temporarily, change html code , replace value of variable?

not such. alternatives include:

  • you take changes , send them server using xmlhttprequest. server respond storing them , sending new version requested in future.
  • you store changes in local storage / cookie / etc, , include javascript in page looks data , updates page loads.
  • a browser plugin written store modifications made given url.

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -