P粉8603709212023-09-04 13:56:35
I thought we can't use bookmarks on mobile devices, but after this question, I did a little research and here are the results:
We can set a bookmark on Chrome and then use it on our phone, we can do this:
On desktop browsers, right-click the bookmarks bar and select Add Page or Add Bookmark from the menu. In the Name field, enter a name for the bookmarklet. In the URL field, enter the following code:
javascript:(function() { alert("This is my test bookmarklet") })();
(This is just a test code, in the function you can write your own code)
Now in your mobile browser, open a page and type your bookmark name in that page (with an asterisk next to it) and click on it to view the alert test. Here are the results on desktop and mobile: