function as google chrome bookmark

前端 未结 6 543
梦毁少年i
梦毁少年i 2020-11-30 21:03

Let me first say the problem I have: I need to fill in the same web page a lot of times, and the content that I need to fill in is for the biggest part the same, but is scat

6条回答
  •  我在风中等你
    2020-11-30 21:32

    You can do this using a bookmarklet. A bookmarklet is a bookmark with a URI starting with the pseudo-protocol javascript: followed by URI-encoded JavaScript code. When you trigger the bookmark, browser will run the code in the context of the current page. So you'd go to that page, then use that bookmarklet to fill in your standard information, and there you go.

    For example, here's a bookmarklet that, when run, will look for an element with the id someElement on the page and, if found, assign "some value" to its value property:

    javascript:(function(){var d=document,e=d.getElementById("someElement");e.value="some value";})();
    

提交回复
热议问题