This article mainly introduces jQuery's method of selecting text by mouse and sending Sina Weibo, which involves jQuery's mouse event response and Sina interface calling skills. It is very simple and practical, for more information about jQuery, see the following example. We will share this with you for your reference. The details are as follows:
I recently noticed that Sina Blog has a small function, that is, a small image will appear when you select a text section. Click this image to send the selected content to Sina Weibo, on the Rise of the moment, I wrote a Demo last night and played it. The code is super simple and not optimized. If you are interested, you can improve it on your own.
The principle is very simple. first obtain the selected text with the mouse, then call the page provided by Sina Blog, and pass the text as a parameter.
The Code is as follows: