是否可以向链接添加小书签,以便它“更改”链接链接目标?
小书签允许您使用 JavaScript 更改当前正在查看的页面。
是否可以将书签添加到链接,以便它“更改”链接指向的下一页?
Bookmarklets allow you change the page you are currently viewing with javascript.
Is it possible to add the bookmarklet to a link so that it "changes" the next page where the link is pointing to?
如果您想创建一个适用于任何网页的通用书签,那么答案是不! :)
但如果你想让它在你控制的页面上工作,那么一切皆有可能。可能的解决方案之一是使用书签向网页添加 cookie。目标页面的创建方式必须根据 cookie 的值改变其行为。
If you want to create a universal bookmarklet working on any webpage then the answer is big fat NO! :)
But if you want to make it work on pages you control then everything is possible. One of possible solutions would be to add a cookie to the webpage using bookmarklet. The target page must be created the way it changes its behavior according to the value of cookie.