Executing JavaScript from the address bar causes the browser to exit the page?

后端 未结 4 1291
借酒劲吻你
借酒劲吻你 2021-02-14 02:17

I\'m testing a webpage, and I want to execute some JavaScript code from the address bar to change some content (e.g. changing the content of a div) I loaded the webpage and type

4条回答
  •  醉梦人生
    2021-02-14 02:40

    Alternative solution: If you don't particularly need it to be the JavaScript that changes the content, if you just need the content of the div changed, then you can use the developer tools in your browser to do that.

    In Firefox: Developer Tools > Inspector > right click the HTML and choose "Edit as HTML".

    In Chrome: Tools > More Tools > Developer Tools > Elements > right click the HTML and choose "Edit as HTML".

    In IE: Developer Tools > HTML > Edit Icon (looks like a piece of paper with a pencil)

提交回复
热议问题