VPS侦探论坛

 找回密码
 注册
查看: 5185|回复: 1

复制本页网址和标题,发送给你QQ/Msn的好友jS代码

[复制链接]
发表于 2011-7-14 06:25:23 | 显示全部楼层 |阅读模式

代码:
  1. document.writeln("
  2. ");
  3. document.writeln("function copypageurltitle()");
  4. document.writeln("{   var clipBoardContent=\'\'; ");
  5. document.writeln("   clipBoardContent =document.title;");
  6. document.writeln("   clipBoardContent+=\'\\r\\n\';");
  7. document.writeln("   clipBoardContent+=document.location;");
  8. document.writeln("   window.clipboardData.setData("Text",clipBoardContent);");
  9. document.writeln("   alert("标题和网址已经拷贝,可以发给你QQ\/Msn的好友,或者粘贴到论坛上和网友一起分享 ^_^ ");");
  10. document.writeln("  }");
  11. document.writeln("");
  12. document.writeln("复制本页网址和标题,发送给你QQ/Msn的好友  本页右侧分享到微博");
复制代码
另存为fav.js 通过以下代码调用 <script type="text/javascript" src="/js/fav.js" charset="utf-8"></script>
或者自己新建GB2312格式
演示地址:http://www.ydy.me/qvod/31595.html

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-7-14 06:28:06 | 显示全部楼层


原帖由 indj 于 2011-7-14 06:25 发表
代码:document.writeln("


帖入代码,网站有过滤掉,直接查看 http://www.ydy.me/js/fav.js 此JS为UTF-8格式
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-19 05:08 , Processed in 0.026211 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表