1、新浪微博分享
- function weiboShare(){
- var wb_shareBtn = document.getElementById("shareBtn");
- wb_url = document.URL, //获取当前页面地址,也可自定义例:wb_url = "http://www.bluesdream.com",用户分享成功后会显示这个url,一般用于回显原网址
- wb_appkey = "",<span style="white-space:pre"> </span>
- wb_title = "【新华坑D,SMD】",
- wb_ralateUid = "3254502533",<span style="white-space:pre"> </span>//这是我的号不要抄好么、你的在上面demo生成的代码里
- wb_pic = "<%=basePath%>images/photo/photo1.png",
- wb_language = "zh_cn";
- wb_shareBtn.setAttribute("href","http://service.weibo.com/share/share.php?url="+wb_url+"&appkey="+wb_appkey+"&title="+wb_title+"&pic="+wb_pic+"&ralateUid="+wb_ralateUid+"&language="+wb_language+"");
- }
- //调用一手
- weiboShare();
时间: 2024-10-27 10:49:12