转发到微博办法 phpcms,dedecms
发布时间:2021-12-16 10:16 所属栏目:19 来源:互联网
导读:dedecms的修改方法: a href=javascript:void(0) onclick=posttowb(); class=tmblogimg src=http://v.t.qq.com/share/images/s/b24.png/a script type=text/javascript function posttowb(){ var _t = encodeuri(fcbao.com -【{dede:field.title/}】{dede:fie
dedecms的修改方法: <a href="javascript:void(0)" onclick="posttowb();" class="tmblog"><img src="http://v.t.qq.com/share/images/s/b24.png"></a> <script type="text/javascript"> function posttowb(){ var _t = encodeuri('fcbao.com -【{dede:field.title/}】{dede:field.description}');//落叶修改,也就是添加cms中的标题和摘要标签 var _url = encodeuricomponent(document.location); var _appkey = encodeuri("appkey");//您从腾讯获得的appkey var _pic = encodeuri('');//(例如:var _pic='图片url1|图片url2|图片url3...) //开源软件:Cuoxin.com var _site = '';//您的网站地址 var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic; window.open( _u,'', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' ); } </script> phpcms转发到微博代码: <a href="javascript:void(0)" onclick="posttowb();" class="tmblog"><img src="http://v.t.qq.com/share/images/s/b24.png"></a><script type="text/javascript"> function posttowb(){ var tt=document.getelementbyid('t1');//t1改成内容页标题外面的div的id或者h1的id; var dd=document.getelementbyid('d1');//d1改成内容页标题下面显示文章摘要的div的id; var pre='网站名或网站域名';//如果是网站域名不要加http://要不然会被微博的url转化 var _t = encodeuri(pre+' -【'+tt+'】'+dd);//此句不用修改 var _url = encodeuricomponent(document.location); var _appkey = encodeuri("appkey");//您从腾讯获得的appkey var _pic = encodeuri('');//(例如:var _pic='图片url1|图片url2|图片url3...) var _site = '';//您的网站地址 var _u = 'http://v.t.qq.com/share/share.php?title='+_t+'&url='+_url+'&appkey='+_appkey+'&site='+_site+'&pic='+_pic; window.open( _u,'', 'width=700, height=680, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, location=yes, resizable=no, status=no' ); } </script> (编辑:ASP站长网) |
相关内容
网友评论
推荐文章
热点阅读