Add a bookmark that is only javascript, not a URL

前端 未结 5 1906
傲寒
傲寒 2020-12-08 02:28

I\'m thinking that the reason I can\'t do this is because it might be a huge security hole, but here goes...

I want to have a bookmark on my browser (FF3, preferably

5条回答
  •  死守一世寂寞
    2020-12-08 02:48

    What you want is a bookmarklet they are easy to create and should work in most major browsers.

    Edit: Stack overflow seems not to allow creating bookmarklets in the context of the site, basically you can create a new bookmark and type the following in the location field

    javascript:window.location='http://www.google.com/search?q='+Date()

    to get a bookmarklet that searches google for the current date.

提交回复
热议问题