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.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744214700a4563497.html
评论列表(0条)