IE js代碼:
復制代碼 代碼如下:
<script type="text/javascript">
function copyUrl2()
{
var Url2=document.getElementById("biao1");
Url2.select(); // 選擇對象
document.execCommand("Copy"); // 執行瀏覽器復制命令
alert("已復制好,可貼粘。");
}
</script>
<textarea cols="20" rows="10">用戶定義的代碼區域</textarea>
<input type="button" value="點擊復制代碼" />
復制代碼 代碼如下:
<script src="http://www.weicaiyun.com/assets/js/copy/ZeroClipboard.js"></script>
<script type="text/javascript">
var clip = new ZeroClipboard.Client();
clip.setHandCursor( true );
clip.setText('復制內容');
clip.glue('button');
</script>
<input type="button" value="點擊復制代碼" />
|
新聞熱點
疑難解答
圖片精選