admin管理员组文章数量:1399978
What I want to do is when I reach the site the link guide to, then execute some javascript
So is it possible include javascript code in url link, or I can attach a javascript file link after the url?
Edited: for instance, when the someone reach my twitter site, then execute some js, the js could click the "follow" button automaticly
What I want to do is when I reach the site the link guide to, then execute some javascript
So is it possible include javascript code in url link, or I can attach a javascript file link after the url?
Edited: for instance, when the someone reach my twitter site, then execute some js, the js could click the "follow" button automaticly
Share Improve this question edited Feb 24, 2013 at 6:50 hh54188 asked Feb 24, 2013 at 6:44 hh54188hh54188 15.7k35 gold badges116 silver badges192 bronze badges 3- Explain what you mean by "reach the site" – JohnFx Commented Feb 24, 2013 at 6:47
- This smells like an XY problem. What are you actually trying to acplish with this? – Matt Ball Commented Feb 24, 2013 at 6:47
- So you just want to run some JS code when people go to your site? Just add it in the body onload event. – JohnFx Commented Feb 24, 2013 at 7:10
3 Answers
Reset to default 4No. It would be a huge security risk to allow that.
You need to see this: Bookmarklet
A bookmarklet is unobtrusive script written in JavaScript and stored as the URL of a bookmark in a web browser or as a hyperlink on a web page.
no you can not add javascript code into url link.
本文标签: Is it possible include javascript in url linkStack Overflow
版权声明:本文标题:Is it possible include javascript in url link? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744214700a2595581.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论