把选中的文字分享到新浪微博
来源:互联网 发布:分析图片日期软件 编辑:程序博客网 时间:2024/05/16 19:38
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="ZhiHuWang.WebForm2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>这是我的分享到测试</title>
<style type="text/css">
.tooltip { width:120px; height:23px;line-height:23px; background-color:#CCCCCC; }
.tooltip a { color: #333333;display: block; font-size: 12px;font-weight: bold;text-indent: 10px; }
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("#blogContent").mouseup(function (e) {
var x = 10;
var y = 10;
var r = "";
if (document.selection)
{
r = document.selection.createRange().text;
}
else if (window.getSelection())
{
r = window.getSelection();
}
$('.href').click(function () {
if (r != "") {
var bowen = "发送到新浪微博";
// var bowen = "<img src='image/新浪.jpg' />";
var tooltip = "<div id='tooltip' class='tooltip'><a onclick=ask('" + r + "')>" + bowen + "</a></div>";
$("body").append(tooltip);
$("#tooltip").css({
"top": (e.pageY + y) + "px",
"left": (e.pageX + x) + "px",
"position": "absolute"
}).show("fast");
}
}).mousedown(function () {
$("#tooltip").remove();
});
})
})
function ask(r) {
if (r != "") {
window.open('http://v.t.sina.com.cn/share/share.php?searchPic=false&title='+r+'&url=http://www.nowwamagic.net&sourceUrl=http%3A%2F%2Fblog.sina.com.cn&content=utf-8&appkey=1617465124', '_blank', 'height=515, width=598, toolbar=no, menubar=no, scrollbars=auto, resizable=yes, location=no, status=yes');
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="blogContent">
<div id="r1" runat="server"></div>
</div>
</form>
</body>
</html>
- 把选中的文字分享到新浪微博
- 内容正文选中一段文字分享到qq微博、新浪微博的代码
- 将选中的文本分享到新浪微博
- 选中文字新浪分享
- 实现将页面选中文字分享到新浪微博、腾讯微博
- js页面文字选中后分享到新浪微博实现
- js页面文字选中后分享到新浪微博实现
- js页面文字选中后分享到新浪微博实现
- 【web前端】js页面文字选中后分享到新浪微博实现
- 转载:js页面文字选中后分享到新浪微博实现
- 分享文字到新浪微博
- javaScript实现选中文字提示新浪微博分享的效果
- 分享到新浪微博
- 分享到新浪微博
- 新浪微博。。openapi 分享 图片+ 文字
- 选中文字就会弹出分享到QQ空间、或微博...
- 分享到新浪微博(二)
- Android分享到新浪微博
- 关于BOOTCMD
- Linux多进程与多线程的深度比较
- deep learning 资料
- C和C++之间库的互相调用
- 识别编码的小程序
- 把选中的文字分享到新浪微博
- C语言--随机数(一)
- Linux中的常用多线程同步方式
- Pywinauto Guideline
- cocos2d-x 拖动效果 成功代码及截图
- drupal theme概述
- SamsungS3C2440平台上的VxworksBSP移植
- sched_setscheduler用法
- 一个域(协议+域名+端口)的资源:页面+页面标签加载的资源