Link that opens a NEW page and runs javascript
问题 I would like to know how to open a page, and then on that page, run javascript (that is set by the link on the first page). I have tried this: <a href = "http://www.example.com/otherpage" onclick = "javascript_on_otherpage()">LINK DISPLAY NAME HERE</a> Does anyone know how to achieve this? 回答1: Warning: Do not use the following code in any remotely-production related machine. It is trivially susceptible to XSS and allows anybody to run any JS code on your website. This means that a malicious