<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" > < html xmlns ="http://www.w3.org/1999/xhtml" > < head > < meta http-equiv ="Content-Type" content ="text/html; charset=gb2312" /> < title > 复制本帖地址 </ title > </ head > < body > < h2 id ="article_title" > 标题 </ h2 > < form id ="form1" name ="form1" method ="post" action ="" > < label > < input type ="submit" name ="Submit" value ="复制本帖地址,传给QQ/Msn/Skype上的好友" onclick ="copyToClipBoard()" > </ label > </ form > </ body > </ html > < script language ="javascript" > ... function copyToClipBoard() ...{ var clipBoardContent=""; clipBoardContent+=document.getElementById('article_title').innerText; clipBoardContent+=' '+document.URL; window.clipboardData.setData("Text",clipBoardContent); alert("复制成功,请粘贴到你的QQ/MSN/Skype上推荐给你的好友"); } </ script >