碼一:
<script>
function selecturl(){
z=document.body.createTextRange();
z.moveToElementText(selecturlP);
z.select();
}
</script>
<span onmousemove='selecturl()' id=selecturlP><script>document.write(location.href)</script>
代碼二:
<script>
function copyCode(o){o.select();var js=o.createTextRange();js.execCommand("Copy");alert("復制成功!");}
document.write("<table align=center class=tableborder1 cellpadding=1 cellspacing=0><tr>");
document.write("<td width=10% nowrap class=tablebody1>本頁URL地址(雙擊復制):</td>");
document.write("<td class=tablebody1><textarea onfocus=this.select() style='width:100%;overflow-y:visible;' ondblclick=copyCode(this) rows=1>");
document.write(self.location+"</textarea></td></tr></table>");
</script>
代碼三:
<script language="javascript">
<!--
function copyToClipBoard(){
var clipBoardContent=document.location;
clipBoardContent+='\r\n';
window.clipboardData.setData("Text",clipBoardContent);
alert("耶!復制成功嘍!你可以粘貼在QQ消息里送給你的好朋友呀!再次感謝你對 {TheBlogTitle} 的支持哦!");
}
//-->
</script>
<script language='javascript'>
document.write("<img src=\"templates/{TemplateName}/images/db.gif\" width=\"49\" height=\"17\">");
document.write("<input size=\"60\" value=\""+document.location+"\"><input type=\"button\" value=\"推薦給朋友\" onclick=\"copyToClipBoard()\">");
</script>
<script>
function selecturl(){
z=document.body.createTextRange();
z.moveToElementText(selecturlP);
z.select();
}
</script>
<span onmousemove='selecturl()' id=selecturlP><script>document.write(location.href)</script>
代碼二:
<script>
function copyCode(o){o.select();var js=o.createTextRange();js.execCommand("Copy");alert("復制成功!");}
document.write("<table align=center class=tableborder1 cellpadding=1 cellspacing=0><tr>");
document.write("<td width=10% nowrap class=tablebody1>本頁URL地址(雙擊復制):</td>");
document.write("<td class=tablebody1><textarea onfocus=this.select() style='width:100%;overflow-y:visible;' ondblclick=copyCode(this) rows=1>");
document.write(self.location+"</textarea></td></tr></table>");
</script>
代碼三:
<script language="javascript">
<!--
function copyToClipBoard(){
var clipBoardContent=document.location;
clipBoardContent+='\r\n';
window.clipboardData.setData("Text",clipBoardContent);
alert("耶!復制成功嘍!你可以粘貼在QQ消息里送給你的好朋友呀!再次感謝你對 {TheBlogTitle} 的支持哦!");
}
//-->
</script>
<script language='javascript'>
document.write("<img src=\"templates/{TemplateName}/images/db.gif\" width=\"49\" height=\"17\">");
document.write("<input size=\"60\" value=\""+document.location+"\"><input type=\"button\" value=\"推薦給朋友\" onclick=\"copyToClipBoard()\">");
</script>
标签:技巧
推薦設計
優秀海報設計精選集(8)海報設計2022-09-23
充滿自然光線!32平米精致裝修設計2022-08-14
親愛的圖書館 | VERSE雜誌版版式設計2022-07-11
生活,就該這麼愛!2022天海報設計2022-06-02
最新文章
實現DIV圓角的JavaScript代碼Javascript教程2007-02-19
JS函數實現鼠標指向圖片后Javascript教程2007-10-28
JavaScript基本數據結構Javascript教程2007-10-08
名詞解釋:JavaScript、JscriJavascript教程2007-10-06