年无分老少,事无分难易,但行之有恒,恒之,何三起,五眠 注册 | 登陆
浏览模式: 标准 | 列表分类:网页设计

点击复制代码,可以用在QQ或银行帐号上。

在IE中可以,但不支持 FF。
1.1.点击复制INPUT内容 鼠标在QQ号上点一下:  可以通过定义input的style来定义背景和边框属性,很方便的说。

<CoolCode>
<script type="text/javascript">
function copyText(obj) 
{
var rng = document.body.createTextRange();
rng.moveToElementText(obj);
rng.scrollIntoView();
rng.select();
rng.execCommand("Copy");
rng.collapse(false);}
</script>
以下是代码片段:
<span id="tbid"><a href="<a href="http://day8.com.cn/web/ro" target="_blank">http://day8.com.cn/web/ro&... target="_blank"><a href="http://day8.com.cn/web/ro" target="_blank">http://day8.com.cn/web/ro&...
[<a href="#" onclick="copyText(document.all.tbid)">点击复制</a>]


<span id="tbid2"><a href="<a href="http://day8.com.cn/web/ro" target="_blank">http://day8.com.cn/web/ro&... target="_blank"><a href="http://day8.com.cn/web/ro" target="_blank">http://day8.com.cn/web/ro&...
[<a href="#" onclick="copyText(document.all.tbid2)">点击复制</a>]

</CoolCode>

Tags: mv

站长推广网站的9种常用方法

网站推广29种常用方法
目录

搜索引擎策略
链接策略
传统营销策略
Email策略
混合策略
付费广告策略
结论

搜索引擎策略

» 阅读全文

防采集的JS代码

<script language="JavaScript" type="text/javascript">
// Example:

// writeCookie("myCookie", "my name", 24);

// Stores the string "my name" in the cookie "myCookie" which expires after 24 hours.

function writeCookie(name, value, hours)

{

 var expire = "";

 if(hours != null)

 {

   expire = new Date((new Date()).getTime() + hours * 3600000);

   expire = "; expires=" + expire.toGMTString();

 }

 document.cookie = name + "=" + escape(value) + expire;

}

// Example:

// alert( readCookie("myCookie") );

function readCookie(name)

{

 var cookieValue = "";

 var search = name + "=";

 if(document.cookie.length > 0)

 {

   offset = document.cookie.indexOf(search);

   if (offset != -1)

   {

     offset += search.length;

     end = document.cookie.indexOf(";", offset);

     if (end == -1) end = document.cookie.length;

     cookieValue = unescape(document.cookie.substring(offset, end))

   }

 }

 return cookieValue;

}


</script>

引用以下asp代码改成的,js代码方便,但有些工具可以绕过JS,用js防止“低手”,节约一部分服务器资源,而用asp防止绕过js判断的“高手”。
结合CMS的封IP,把本地的127.0.0.1也封掉,效果会好些:
<%
Dim AppealNum,AppealCount
AppealNum=10                                                 '同一IP60秒内请求限制10次
AppealCount=Request.Cookies("AppealCount")
If AppealCount="" Then
response.Cookies("AppealCount")=1
AppealCount=1
response.cookies("AppealCount").expires=dateadd("s",60,now())
Else
response.Cookies("AppealCount")=AppealCount+1
response.cookies("AppealCount").expires=dateadd("s",60,now())
End If
if int(AppealCount)>int(AppealNum) then
response.write "抓取很累,歇一会儿吧!"
response.end
End If
%>

Tags: 越狱

关于文字换行DIV

[html]
12345678901234567890123456789012345678901234567890123456789012345678901234567890

[/html]

Tags: 越狱

Records:151234